Apply loop shorthand macros (#17159)

This commit is contained in:
Scott Lahteine
2020-03-13 23:18:16 -05:00
committed by GitHub
parent a96be32fae
commit 118bd2f8b2
93 changed files with 465 additions and 505 deletions

View File

@@ -81,7 +81,7 @@ void write_to_lcd_P(PGM_P const message) {
char encoded_message[MAX_CURLY_COMMAND];
uint8_t message_length = _MIN(strlen_P(message), sizeof(encoded_message));
for (uint8_t i = 0; i < message_length; i++)
LOOP_L_N(i, message_length)
encoded_message[i] = pgm_read_byte(&message[i]) | 0x80;
LCD_SERIAL.Print::write(encoded_message, message_length);
@@ -91,7 +91,7 @@ void write_to_lcd(const char * const message) {
char encoded_message[MAX_CURLY_COMMAND];
const uint8_t message_length = _MIN(strlen(message), sizeof(encoded_message));
for (uint8_t i = 0; i < message_length; i++)
LOOP_L_N(i, message_length)
encoded_message[i] = message[i] | 0x80;
LCD_SERIAL.Print::write(encoded_message, message_length);