Charles Young's development fork. Going forward I only want to push mature code to main repository.
Fork of GEO_COUNTER_L432KC by
Diff: main.cpp
- Revision:
- 39:dee91966b45c
- Parent:
- 38:1642320d83a0
- Child:
- 41:08bf3ea5eba4
--- a/main.cpp Thu Sep 06 10:03:01 2018 -0700 +++ b/main.cpp Thu Sep 06 10:06:50 2018 -0700 @@ -205,25 +205,23 @@ case NULL2: break; case VOLUME: - if (!isnan(direction)) - { - if (direction > 0) - (volume < maxVolume ? volume++:); - else - if (direction < 0) - (volume > 0 ? volume--:); - } + if ( (direction > 0) + && (volume < maxVolume)) + volume++; + else + if ( (direction < 0) + && (volume > 0)) + volume--; + DigitsDisplay.Display_2D_write(volume); break; case DIM: - if (!isnan(direction)) - { - if (direction > 0) - DigitsDisplay.Display_brightness_up(); - else - if (direction < 0) - DigitsDisplay.Display_brightness_down(); - } + if (direction > 0) + DigitsDisplay.Display_brightness_up(); + else + if (direction < 0) + DigitsDisplay.Display_brightness_down(); + DigitsDisplay.Display_2D_write(DigitsDisplay.GetBrightness()); break; default: