Index: apps/plugins/resistor.c =================================================================== --- apps/plugins/resistor.c (revisione 28380) +++ apps/plugins/resistor.c (copia locale) @@ -69,6 +69,16 @@ #endif /* USE_TEXT_ONLY */ +/* + After the resistor is drawn, the plugin pauses for this number of msecs to + give some time to the user to depress the last key pressed (e.g. still from + last input) and clear the input. + Without this, at least on FuzeV1, the resistor disappears immediately if + there's just been a keypad input (=> LED resistor calculator). The default I + set is 200 msec, I suspect that less can still be effective, but who cares. +*/ +#define SLEEP_AFTER_DRAWING_MSEC 200 + enum color { RES_BLACK, RES_BROWN, @@ -760,6 +770,8 @@ rb->lcd_update(); + rb->sleep(SLEEP_AFTER_DRAWING_MSEC); + rb->button_clear_queue(); button_press = rb->button_get(true); switch(button_press) { case PLA_SELECT: @@ -898,6 +910,8 @@ rb->lcd_puts_scroll(r_to_c_out_str_x, lineno++, out_str); rb->lcd_update(); + rb->sleep(SLEEP_AFTER_DRAWING_MSEC); + rb->button_clear_queue(); button_press = rb->button_get(true); switch(button_press) { case PLA_SELECT: @@ -948,7 +962,6 @@ total_resistance_centiunits = calculate_resistance(first_band, second_band, third_band); - rb->lcd_clear_display(); lineno = INITIAL_TEXT_Y; #ifndef USE_TEXT_ONLY @@ -976,7 +989,9 @@ rb->lcd_puts_scroll(tolerance_str_x, lineno++, get_tolerance_str(fourth_band)); rb->lcd_update(); - + + rb->sleep(SLEEP_AFTER_DRAWING_MSEC); + rb->button_clear_queue(); button_input = rb->button_get(true); switch(button_input) { case PLA_RIGHT: