diff --git a/display.c b/display.c --- a/display.c +++ b/display.c @@ -48,15 +48,15 @@ void display_process(therm_settings_t* s { // Write text to OLED // [ therm :: idle ] - ssd1306_DrawString("therm :: idle ", 0, 40); + ssd1306_drawstring("therm :: idle ", 0, 40); status->pid_enabled = 0; if(temp_changed) { char tempstr[6]; itoa_fp(status->temp, status->temp_frac, tempstr); - ssd1306_DrawString("Temp: ", 3, 40); - ssd1306_DrawString(" ", 3, 72); - ssd1306_DrawString(tempstr, 3, 72); + ssd1306_drawstring("Temp: ", 3, 40); + ssd1306_drawstring(" ", 3, 72); + ssd1306_drawstring(tempstr, 3, 72); } ssd1306_drawlogo(); @@ -64,22 +64,22 @@ void display_process(therm_settings_t* s switch(goto_mode) { case 3: { - ssd1306_DrawString("-> loader ", 1, 40); + ssd1306_drawstring("-> loader ", 1, 40); } break; case 2: { - ssd1306_DrawString("-> heat ", 1, 40); + ssd1306_drawstring("-> heat ", 1, 40); } break; case 1: { - ssd1306_DrawString("-> setup ", 1, 40); + ssd1306_drawstring("-> setup ", 1, 40); } break; case 0: { - ssd1306_DrawString("-> reset ", 1, 40); + ssd1306_drawstring("-> reset ", 1, 40); } } @@ -89,9 +89,9 @@ void display_process(therm_settings_t* s case 3: { ssd1306_clearscreen(); - ssd1306_DrawString("Bootloader Entered", 0, 0); - ssd1306_DrawString("Device won't boot", 2, 0); - ssd1306_DrawString("until reflashed!", 3, 0); + ssd1306_drawstring("Bootloader Entered", 0, 0); + ssd1306_drawstring("Device won't boot", 2, 0); + ssd1306_drawstring("until reflashed!", 3, 0); bootloader_enter(); // Resets into bootloader status->state = STATE_IDLE; // Just in case } break; @@ -129,16 +129,16 @@ void display_process(therm_settings_t* s // Write text to OLED // [ therm :: set p ] // [ p = 12 ] - ssd1306_DrawString("Proportional", 0, 40); + ssd1306_drawstring("Proportional", 0, 40); ssd1306_drawlogo(); char tempstr[6]; itoa(set->val.k_p, tempstr, 10); - ssd1306_DrawString("P=", 1, 45); - ssd1306_DrawString(" ", 1, 57); - ssd1306_DrawString(tempstr, 1, 57); + ssd1306_drawstring("P=", 1, 45); + ssd1306_drawstring(" ", 1, 57); + ssd1306_drawstring(tempstr, 1, 57); - ssd1306_DrawString("Press to accept", 3, 40); + ssd1306_drawstring("Press to accept", 3, 40); // Button handler if(SW_BTN_PRESSED) { @@ -158,16 +158,16 @@ void display_process(therm_settings_t* s // Write text to OLED // [ therm :: set i ] // [ i = 12 ] - ssd1306_DrawString("Integral", 0, 40); + ssd1306_drawstring("Integral", 0, 40); ssd1306_drawlogo(); char tempstr[6]; itoa(set->val.k_i, tempstr, 10); - ssd1306_DrawString("I=", 1, 45); - ssd1306_DrawString(" ", 1, 57); - ssd1306_DrawString(tempstr, 1, 57); + ssd1306_drawstring("I=", 1, 45); + ssd1306_drawstring(" ", 1, 57); + ssd1306_drawstring(tempstr, 1, 57); - ssd1306_DrawString("Press to accept", 3, 40); + ssd1306_drawstring("Press to accept", 3, 40); // Button handler if(SW_BTN_PRESSED) { @@ -187,16 +187,16 @@ void display_process(therm_settings_t* s // Write text to OLED // [ therm :: set d ] // [ d = 12 ] - ssd1306_DrawString("Derivative", 0, 40); + ssd1306_drawstring("Derivative", 0, 40); ssd1306_drawlogo(); char tempstr[6]; itoa(set->val.k_d, tempstr, 10); - ssd1306_DrawString("D=", 1, 45); - ssd1306_DrawString(" ", 1, 57); - ssd1306_DrawString(tempstr, 1, 57); + ssd1306_drawstring("D=", 1, 45); + ssd1306_drawstring(" ", 1, 57); + ssd1306_drawstring(tempstr, 1, 57); - ssd1306_DrawString("Press to accept", 3, 40); + ssd1306_drawstring("Press to accept", 3, 40); // Button handler if(SW_BTN_PRESSED) { @@ -216,16 +216,16 @@ void display_process(therm_settings_t* s // Write text to OLED // [ therm :: set windup ] // [ g = 12 ] - ssd1306_DrawString("Windup Guard", 0, 40); + ssd1306_drawstring("Windup Guard", 0, 40); ssd1306_drawlogo(); char tempstr[6]; itoa(set->val.windup_guard, tempstr, 10); - ssd1306_DrawString("G=", 1, 45); - ssd1306_DrawString(" ", 1, 57); - ssd1306_DrawString(tempstr, 1, 57); + ssd1306_drawstring("G=", 1, 45); + ssd1306_drawstring(" ", 1, 57); + ssd1306_drawstring(tempstr, 1, 57); - ssd1306_DrawString("Press to accept", 3, 40); + ssd1306_drawstring("Press to accept", 3, 40); // Button handler if(SW_BTN_PRESSED) { @@ -245,17 +245,17 @@ void display_process(therm_settings_t* s // Write text to OLED // [ therm :: set windup ] // [ g = 12 ] - ssd1306_DrawString("Start on Boot", 0, 40); + ssd1306_drawstring("Start on Boot", 0, 40); ssd1306_drawlogo(); - ssd1306_DrawString("sob=", 1, 45); + ssd1306_drawstring("sob=", 1, 45); if(set->val.boottobrew) - ssd1306_DrawString("Enabled ", 1, 70); + ssd1306_drawstring("Enabled ", 1, 70); else - ssd1306_DrawString("Disabled", 1, 70); + ssd1306_drawstring("Disabled", 1, 70); - ssd1306_DrawString("Press to accept", 3, 40); + ssd1306_drawstring("Press to accept", 3, 40); // Button handler if(SW_BTN_PRESSED) { @@ -278,15 +278,15 @@ void display_process(therm_settings_t* s // Write text to OLED // [ therm :: set windup ] // [ g = 12 ] - ssd1306_DrawString("Units: ", 0, 40); + ssd1306_drawstring("Units: ", 0, 40); ssd1306_drawlogo(); if(set->val.temp_units == TEMP_UNITS_FAHRENHEIT) - ssd1306_DrawString("Fahrenheit", 1, 60); + ssd1306_drawstring("Fahrenheit", 1, 60); else - ssd1306_DrawString("Celsius ", 1, 60); + ssd1306_drawstring("Celsius ", 1, 60); - ssd1306_DrawString("Press to accept", 3, 40); + ssd1306_drawstring("Press to accept", 3, 40); // Button handler if(SW_BTN_PRESSED) { @@ -310,16 +310,16 @@ void display_process(therm_settings_t* s // Write text to OLED // [ therm :: set temp offset ] // [ g = 12 ] - ssd1306_DrawString("Temp Cal Offset", 0, 40); + ssd1306_drawstring("Temp Cal Offset", 0, 40); ssd1306_drawlogo(); char tempstr[6]; itoa(set->val.temp_offset, tempstr, 10); - ssd1306_DrawString("O=", 1, 45); - ssd1306_DrawString(" ", 1, 57); - ssd1306_DrawString(tempstr, 1, 57); + ssd1306_drawstring("O=", 1, 45); + ssd1306_drawstring(" ", 1, 57); + ssd1306_drawstring(tempstr, 1, 57); - ssd1306_DrawString("Press to accept", 3, 40); + ssd1306_drawstring("Press to accept", 3, 40); // Button handler if(SW_BTN_PRESSED) { @@ -341,7 +341,7 @@ void display_process(therm_settings_t* s // Write text to OLED // [ therm : preheating brew ] // [ 30 => 120 C ] - ssd1306_DrawString("Preheating...", 0, 0); + ssd1306_drawstring("Preheating...", 0, 0); //ssd1306_drawlogo(); draw_setpoint(status); @@ -368,7 +368,7 @@ void display_process(therm_settings_t* s // Write text to OLED // [ therm : ready to brew ] // [ 30 => 120 C ] - ssd1306_DrawString("Preheated!", 0, 0); + ssd1306_drawstring("Preheated!", 0, 0); //ssd1306_drawlogo(); draw_setpoint(status); status->pid_enabled = 1; @@ -392,7 +392,7 @@ void display_process(therm_settings_t* s // Write text to OLED // [ therm : preheating steam ] // [ 30 => 120 C ] - ssd1306_DrawString("Preheating...", 0, 0); + ssd1306_drawstring("Preheating...", 0, 0); //ssd1306_drawlogo(); draw_setpoint(status); status->pid_enabled = 1; @@ -418,7 +418,7 @@ void display_process(therm_settings_t* s // Write text to OLED // [ therm : ready to steam ] // [ 30 => 120 C ] - ssd1306_DrawString("Ready to Steam!", 0, 0); + ssd1306_drawstring("Ready to Steam!", 0, 0); //ssd1306_drawlogo(); draw_setpoint(status); status->pid_enabled = 1; @@ -442,24 +442,24 @@ void display_process(therm_settings_t* s // Write text to OLED // [ therm : ready to steam ] // [ 30 => 120 C ] - ssd1306_DrawString("Error: ", 0, 0); + ssd1306_drawstring("Error: ", 0, 0); char tempstr[6]; itoa(status->tc_errno, tempstr, 10); - ssd1306_DrawString(tempstr, 0, 57); + ssd1306_drawstring(tempstr, 0, 57); if(status->tc_errno == 1) - ssd1306_DrawString(" TC Open Circuit", 1, 0); + ssd1306_drawstring(" TC Open Circuit", 1, 0); else if(status->tc_errno == 4) - ssd1306_DrawString(" TC Short to GND", 1, 0); + ssd1306_drawstring(" TC Short to GND", 1, 0); else if(status->tc_errno == 8) - ssd1306_DrawString(" TC Short to VCC", 1, 0); + ssd1306_drawstring(" TC Short to VCC", 1, 0); else - ssd1306_DrawString("#?, Unknown Error", 1, 0); - ssd1306_DrawString(" ", 2, 0); + ssd1306_drawstring("#?, Unknown Error", 1, 0); + ssd1306_drawstring(" ", 2, 0); - ssd1306_DrawString("-> to ignore all or", 2, 0); - ssd1306_DrawString("press to continue", 3, 0); + ssd1306_drawstring("-> to ignore all or", 2, 0); + ssd1306_drawstring("press to continue", 3, 0); // Button handler if(SW_BTN_PRESSED) { @@ -508,18 +508,18 @@ void draw_setpoint(therm_status_t* statu if(status->temp != temp_last || trigger_drawsetpoint) { char tempstr[3]; itoa_fp(status->temp, status->temp_frac, tempstr); - ssd1306_DrawStringBig(" ", 3, 0); - ssd1306_DrawStringBig(tempstr, 3, 0); + ssd1306_drawstringbig(" ", 3, 0); + ssd1306_drawstringbig(tempstr, 3, 0); } if(trigger_drawsetpoint) - ssd1306_DrawStringBig(">", 3, 74); + ssd1306_drawstringbig(">", 3, 74); if(status->setpoint != setpoint_last || trigger_drawsetpoint) { char tempstr[3]; itoa(status->setpoint, tempstr, 10); - ssd1306_DrawStringBig(" ", 3, 90); - ssd1306_DrawStringBig(tempstr, 3, 90); + ssd1306_drawstringbig(" ", 3, 90); + ssd1306_drawstringbig(tempstr, 3, 90); } trigger_drawsetpoint = 0;