small comment changes

This commit is contained in:
interfisch 2020-06-01 15:28:46 +02:00
parent 0d7f80ec3b
commit 3a78ff3ac1
1 changed files with 7 additions and 3 deletions

View File

@ -5,6 +5,10 @@
//may need 3v3 from usb ttl converter (hold down flash button while connecting). Holding down the power button is not needed in this case.
//Sometimes reconnecting the usb ttl converter to the pc helps just before pressing the upload button
/* TODO:
* Do not immediately drive backwards.
*/
// RX(green) is A10 , TX (blue) ist A9 (3v3 level)
//to flash set boot0 (the one further away from reset button) to 1 and press reset, flash, program executes immediately
//set boot0 back to 0 to run program on powerup
@ -17,7 +21,7 @@
//#define DEBUG_RX // [-] Debug received data. Prints all bytes to serial (comment-out to disable)
//#define MAXADCVALUE 4095
#define ADC_CALIB_THROTTLE_LOWEST 1900 //a bit above maximum adc value if throttle it not touched
#define ADC_CALIB_THROTTLE_LOWEST 1900 //a bit above adc value if throttle it not touched
#define ADC_CALIB_THROTTLE_MIN 2000 //minimum adc value that should correspond to 0 speed
#define ADC_CALIB_THROTTLE_MAX 3110 //maximum adc value that should correspond to full speed
@ -577,7 +581,7 @@ void ledUpdate() {
// ## StartLed ##
uint8_t _ledbrightness;
switch (currentmode) { //modeLed for different currentmodes
case booting: //Startled dimmed
case booting:
startled=255;
break;
case idle: //Breathing Startled
@ -610,7 +614,7 @@ void ledUpdate() {
modeled_green=255; modeled_red=0; //ModeLed=Green
break;
case error:
modeled_green=0; modeled_red=255; //ModeLed=Red
modeled_green=0; modeled_red=(loopmillis/FASTERRORBLINKDELAY)%2==0 ? 0 : 255; // Blink led , ModeLed=Red
break;
case off:
modeled_green=255; modeled_red=255; //ModeLed=Yellow