diff options
author | Buzz <davidbuzz@gmail.com> | 2013-09-10 13:20:45 +1000 |
---|---|---|
committer | Buzz <davidbuzz@gmail.com> | 2013-09-10 13:32:32 +1000 |
commit | c12955fbc0fca071fde4f64f0c9bf255b0a89420 (patch) | |
tree | 0b85525d267e975538b60d4c1fb47166609e852d /src | |
parent | 7866b90477c1eb929c6dbf655b5c287a3abae5c4 (diff) | |
download | px4-firmware-c12955fbc0fca071fde4f64f0c9bf255b0a89420.tar.gz px4-firmware-c12955fbc0fca071fde4f64f0c9bf255b0a89420.tar.bz2 px4-firmware-c12955fbc0fca071fde4f64f0c9bf255b0a89420.zip |
the "rgbled rgb X X X" command was broken, and would set green when you asked for red, and blue when you asked for green, and never set red. - off by 1 error in parameter numbering.
Diffstat (limited to 'src')
-rw-r--r-- | src/drivers/rgbled/rgbled.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/drivers/rgbled/rgbled.cpp b/src/drivers/rgbled/rgbled.cpp index feb8f1c6c..ee1d472a2 100644 --- a/src/drivers/rgbled/rgbled.cpp +++ b/src/drivers/rgbled/rgbled.cpp @@ -590,9 +590,9 @@ rgbled_main(int argc, char *argv[]) errx(1, "Usage: rgbled rgb <red> <green> <blue>"); } rgbled_rgbset_t v; - v.red = strtol(argv[1], NULL, 0); - v.green = strtol(argv[2], NULL, 0); - v.blue = strtol(argv[3], NULL, 0); + v.red = strtol(argv[2], NULL, 0); + v.green = strtol(argv[3], NULL, 0); + v.blue = strtol(argv[4], NULL, 0); ret = ioctl(fd, RGBLED_SET_RGB, (unsigned long)&v); close(fd); exit(ret); |