Add showing the tip temp on idle (#226)

This shows the tip temp on the simple home screen if the temp is > 50C.

This removes the tip temp warning for all users, as now everyone can see the tip temp.

#187
This commit is contained in:
Ben V. Brown
2018-04-27 14:46:59 +10:00
committed by GitHub
parent bf7f1f5062
commit b6351f9696
3 changed files with 72 additions and 28 deletions

View File

@@ -29,14 +29,14 @@ public:
OLED(FRToSI2C* i2cHandle); // Initialize Driver and store I2C pointer
void initialize(); // Startup the I2C coms (brings screen out of reset etc)
void refresh(); // Draw the buffer out to the LCD using the DMA Channel
void drawChar(char c, char preCursorCommand = '\0');// Draw a character to a specific location
void drawChar(char c, char preCursorCommand = '\0'); // Draw a character to a specific location
void displayOnOff(bool on); // Turn the screen on or not
void setRotation(bool leftHanded); // Set the rotation for the screen
bool getRotation(); // Get the current rotation of the LCD
void print(const char* string); // Draw a string to the current location, with current font
void setCursor(int16_t x, int16_t y); // Set the cursor location by pixels
void setCharCursor(int16_t x, int16_t y); //Set cursor location by chars in current font
void setFont(uint8_t fontNumber);// (Future) Set the font that is being used
void setFont(uint8_t fontNumber); // (Future) Set the font that is being used
void drawImage(const uint8_t* buffer, uint8_t x, uint8_t width);
// Draws an image to the buffer, at x offset from top to bottom (fixed height renders)
void printNumber(uint16_t number, uint8_t places);
@@ -47,13 +47,15 @@ public:
void drawSymbol(uint8_t symbolID);//Used for drawing symbols of a predictable width
void drawArea(int16_t x, int8_t y, uint8_t wide, uint8_t height,
const uint8_t* ptr);
void fillArea(int16_t x, int8_t y, uint8_t wide, uint8_t height,
const uint8_t value);
private:
//Draw a buffer to the screen buffer
FRToSI2C* i2c; //i2c Pointer
const uint8_t* currentFont; // Pointer to the current font used for rendering to the buffer
uint8_t screenBuffer[12 + 96 + 96 + 10]; // The data buffer
uint8_t screenBuffer[14 + 96 + 96 + 10]; // The data buffer
uint8_t* firstStripPtr; // Pointers to the strips to allow for buffer having extra content
uint8_t* secondStripPtr; //Pointers to the strips
bool inLeftHandedMode; // Whether the screen is in left or not (used for offsets in GRAM)