diff options
author | Lorenz Meier <lm@inf.ethz.ch> | 2015-02-03 13:46:17 +0100 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2015-02-09 22:56:22 +0100 |
commit | 2bf00922827c4873c9a50d740e5c646665d2b4cb (patch) | |
tree | 226f9191664602be0789be9053f2a5f8d6e928ea /src/drivers/rgbled/rgbled.cpp | |
parent | f364176b9a45543be6e9d8685bb37b8614b50143 (diff) | |
download | px4-firmware-2bf00922827c4873c9a50d740e5c646665d2b4cb.tar.gz px4-firmware-2bf00922827c4873c9a50d740e5c646665d2b4cb.tar.bz2 px4-firmware-2bf00922827c4873c9a50d740e5c646665d2b4cb.zip |
RGB Led: move to 0 based index
Diffstat (limited to 'src/drivers/rgbled/rgbled.cpp')
-rw-r--r-- | src/drivers/rgbled/rgbled.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/drivers/rgbled/rgbled.cpp b/src/drivers/rgbled/rgbled.cpp index d35722244..0cbd21f57 100644 --- a/src/drivers/rgbled/rgbled.cpp +++ b/src/drivers/rgbled/rgbled.cpp @@ -129,7 +129,7 @@ void rgbled_usage(); extern "C" __EXPORT int rgbled_main(int argc, char *argv[]); RGBLED::RGBLED(int bus, int rgbled) : - I2C("rgbled", RGBLED_DEVICE_PATH, bus, rgbled, 100000), + I2C("rgbled", RGBLED0_DEVICE_PATH, bus, rgbled, 100000), _mode(RGBLED_MODE_OFF), _r(0), _g(0), @@ -649,10 +649,10 @@ rgbled_main(int argc, char *argv[]) } if (!strcmp(verb, "test")) { - fd = open(RGBLED_DEVICE_PATH, 0); + fd = open(RGBLED0_DEVICE_PATH, 0); if (fd == -1) { - errx(1, "Unable to open " RGBLED_DEVICE_PATH); + errx(1, "Unable to open " RGBLED0_DEVICE_PATH); } rgbled_pattern_t pattern = { {RGBLED_COLOR_RED, RGBLED_COLOR_GREEN, RGBLED_COLOR_BLUE, RGBLED_COLOR_WHITE, RGBLED_COLOR_OFF, RGBLED_COLOR_OFF}, @@ -672,10 +672,10 @@ rgbled_main(int argc, char *argv[]) } if (!strcmp(verb, "off") || !strcmp(verb, "stop")) { - fd = open(RGBLED_DEVICE_PATH, 0); + fd = open(RGBLED0_DEVICE_PATH, 0); if (fd == -1) { - errx(1, "Unable to open " RGBLED_DEVICE_PATH); + errx(1, "Unable to open " RGBLED0_DEVICE_PATH); } ret = ioctl(fd, RGBLED_SET_MODE, (unsigned long)RGBLED_MODE_OFF); @@ -694,10 +694,10 @@ rgbled_main(int argc, char *argv[]) errx(1, "Usage: rgbled rgb <red> <green> <blue>"); } - fd = open(RGBLED_DEVICE_PATH, 0); + fd = open(RGBLED0_DEVICE_PATH, 0); if (fd == -1) { - errx(1, "Unable to open " RGBLED_DEVICE_PATH); + errx(1, "Unable to open " RGBLED0_DEVICE_PATH); } rgbled_rgbset_t v; |