🎨 Misc. shorthand operators

This commit is contained in:
Scott Lahteine
2022-06-26 10:01:22 -05:00
parent 0435b2220a
commit 23f19e9ce8
8 changed files with 18 additions and 18 deletions

View File

@ -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:

View File

@ -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) {

View File

@ -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;