🎨 Misc. shorthand operators
This commit is contained in:
@ -1141,7 +1141,7 @@ void DGUSScreenHandlerMKS::HandleAccChange(DGUS_VP_Variable &var, void *val_ptr)
|
||||
else
|
||||
queue.inject(F("M290 Z-0.01"));
|
||||
|
||||
z_offset_add = z_offset_add - ZOffset_distance;
|
||||
z_offset_add -= ZOffset_distance;
|
||||
break;
|
||||
|
||||
case 1:
|
||||
@ -1156,7 +1156,7 @@ void DGUSScreenHandlerMKS::HandleAccChange(DGUS_VP_Variable &var, void *val_ptr)
|
||||
else
|
||||
queue.inject(F("M290 Z-0.01"));
|
||||
|
||||
z_offset_add = z_offset_add + ZOffset_distance;
|
||||
z_offset_add += ZOffset_distance;
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -1638,7 +1638,7 @@ void esp_data_parser(char *cmdRxBuf, int len) {
|
||||
|
||||
esp_msg_index += cpyLen;
|
||||
|
||||
leftLen = leftLen - cpyLen;
|
||||
leftLen -= cpyLen;
|
||||
tail_pos = charAtArray(esp_msg_buf, esp_msg_index, ESP_PROTOC_TAIL);
|
||||
|
||||
if (tail_pos == -1) {
|
||||
|
@ -175,7 +175,7 @@ void Touch::touch(touch_control_t *control) {
|
||||
ui.refresh();
|
||||
break;
|
||||
case PAGE_DOWN:
|
||||
encoderTopLine = encoderTopLine + 2 * LCD_HEIGHT < screen_items ? encoderTopLine + LCD_HEIGHT : screen_items - LCD_HEIGHT;
|
||||
encoderTopLine = (encoderTopLine + 2 * LCD_HEIGHT < screen_items) ? encoderTopLine + LCD_HEIGHT : screen_items - LCD_HEIGHT;
|
||||
ui.encoderPosition = ui.encoderPosition + LCD_HEIGHT < (uint32_t)screen_items ? ui.encoderPosition + LCD_HEIGHT : screen_items;
|
||||
ui.refresh();
|
||||
break;
|
||||
|
Reference in New Issue
Block a user