Fix compiler warning sketch/Marlin_main.cpp:6584:19: warning: comparison is always true due to limited range of data type [-Wtype-limits]

This commit is contained in:
Marek Bel 2018-08-06 17:07:04 +02:00
parent 72cfa1b124
commit 30438833c6

View File

@ -6580,8 +6580,8 @@ if((eSoundMode==e_SOUND_MODE_LOUD)||(eSoundMode==e_SOUND_MODE_ONCE))
else if (code_seen('S')) { // Sxxx Iyyy - Set compensation ustep value S for compensation table index I
int16_t usteps = code_value();
if (code_seen('I')) {
byte index = code_value();
if ((index >= 0) && (index < 5)) {
uint8_t index = code_value();
if (index < 5) {
EEPROM_save_B(EEPROM_PROBE_TEMP_SHIFT + index * 2, &usteps);
SERIAL_PROTOCOLLN("OK");
SERIAL_PROTOCOLLN("index, temp, ustep, um");