diff --git a/src/OLED/BTScreen.cpp b/src/OLED/BTScreen.cpp new file mode 100644 index 0000000..3436c78 --- /dev/null +++ b/src/OLED/BTScreen.cpp @@ -0,0 +1,115 @@ +/* + * This file is part of the "bluetoothheater" distribution + * (https://gitlab.com/mrjones.id.au/bluetoothheater) + * + * Copyright (C) 2018 Ray Jones + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +#include "BTScreen.h" +#include "KeyPad.h" +#include "../Utility/helpers.h" +#include "../Bluetooth/BluetoothAbstract.h" +#include "../Utility/NVStorage.h" +#include "fonts/Arial.h" + +/////////////////////////////////////////////////////////////////////////// +// +// CBTScreen +// +// This screen presents Bluetooth status information +// +/////////////////////////////////////////////////////////////////////////// + + +static const int LIMIT_AWAY = 0; +static const int LIMIT_LEFT = 1; +static const int LIMIT_RIGHT = 2; + +CBTScreen::CBTScreen(C128x64_OLED& display, CScreenManager& mgr) : CScreen(display, mgr) +{ + _initUI(); +} + +void +CBTScreen::onSelect() +{ + CScreen::onSelect(); + _initUI(); +} + +void +CBTScreen::_initUI() +{ + _rowSel = 0; + _colSel = 0; +} + +bool +CBTScreen::show() +{ +// CScreenHeader::show(false); + CScreen::show(); + + int yPos = 18; + + _showTitle("Bluetooth info"); + + yPos = 35; + _printMenuText(0, yPos, "MAC:"); + _printMenuText(25, yPos, getBluetoothClient().getMAC()); + + _printMenuText(_display.xCentre(), 53, " \021 \020 ", true, eCentreJustify); + _printMenuText(_display.xCentre(), 53, "Exit", false, eCentreJustify); + return true; +} + +bool +CBTScreen::keyHandler(uint8_t event) +{ + if(event & keyPressed) { + // press CENTRE + if(event & key_Centre) { + _ScreenManager.selectMenu(CScreenManager::RootMenuLoop); // force return to main menu + } + // press LEFT + if(event & key_Left) { + switch(_rowSel) { + case 0: + _ScreenManager.prevMenu(); + break; + } + } + // press RIGHT + if(event & key_Right) { + switch(_rowSel) { + case 0: + _ScreenManager.nextMenu(); + break; + } + } + // press UP + if(event & key_Up) { + } + // press DOWN + if(event & key_Down) { + } + _ScreenManager.reqUpdate(); + } + + return true; +} + diff --git a/src/OLED/BTScreen.h b/src/OLED/BTScreen.h new file mode 100644 index 0000000..1958903 --- /dev/null +++ b/src/OLED/BTScreen.h @@ -0,0 +1,42 @@ +/* + * This file is part of the "bluetoothheater" distribution + * (https://gitlab.com/mrjones.id.au/bluetoothheater) + * + * Copyright (C) 2018 Ray Jones + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +#ifndef __BTSCREEN_H__ +#define __BTSCREEN_H__ + +#include +#include "ScreenHeader.h" + +class C128x64_OLED; +class CScreenManager; + +class CBTScreen : public CScreen { +public: + CBTScreen(C128x64_OLED& display, CScreenManager& mgr); + void onSelect(); + bool show(); + bool keyHandler(uint8_t event); +private: + int _rowSel, _colSel; + void _initUI(); +}; + +#endif diff --git a/src/OLED/FuelCalScreen.cpp b/src/OLED/FuelCalScreen.cpp index fafe278..e5fff73 100644 --- a/src/OLED/FuelCalScreen.cpp +++ b/src/OLED/FuelCalScreen.cpp @@ -227,7 +227,7 @@ CFuelCalScreen::keyHandler(uint8_t event) case 4: // confirmed save _display.clearDisplay(); _animateCount = -1; - _showStoringMessage(); + _enableStoringMessage(); tuning = NVstore.getHeaterTuning(); tuning.pumpCal = _mlPerStroke; tuning.lowVolts = _LVC; diff --git a/src/OLED/FuelMixtureScreen.cpp b/src/OLED/FuelMixtureScreen.cpp index 8347ffe..5f31bee 100644 --- a/src/OLED/FuelMixtureScreen.cpp +++ b/src/OLED/FuelMixtureScreen.cpp @@ -245,7 +245,7 @@ CFuelMixtureScreen::keyHandler(uint8_t event) case 5: _display.clearDisplay(); _animateCount = -1; - _showStoringMessage(); + _enableStoringMessage(); setPumpMin(adjPump[0]); setPumpMax(adjPump[1]); setFanMin(adjFan[0]); diff --git a/src/OLED/GPIOScreen.cpp b/src/OLED/GPIOScreen.cpp index 95c6b7a..63b350b 100644 --- a/src/OLED/GPIOScreen.cpp +++ b/src/OLED/GPIOScreen.cpp @@ -227,7 +227,7 @@ CGPIOScreen::keyHandler(uint8_t event) UPPERLIMIT(_rowSel, 3); break; case 4: // confirmed save - _showStoringMessage(); + _enableStoringMessage(); us = NVstore.getUserSettings(); us.GPIO = _GPIOparams; NVstore.setUserSettings(us); diff --git a/src/OLED/HeaterSettingsScreen.cpp b/src/OLED/HeaterSettingsScreen.cpp index 67abd4e..48bac54 100644 --- a/src/OLED/HeaterSettingsScreen.cpp +++ b/src/OLED/HeaterSettingsScreen.cpp @@ -203,7 +203,7 @@ CHeaterSettingsScreen::keyHandler(uint8_t event) UPPERLIMIT(_rowSel, 3); break; case 4: // confirmed save - _showStoringMessage(); + _enableStoringMessage(); setSystemVoltage(float(_sysVoltage)); setFanSensor(_fanSensor); setGlowDrive(_glowDrive); diff --git a/src/OLED/HomeMenuSelScreen.cpp b/src/OLED/HomeMenuSelScreen.cpp index 4d8ff4f..3ee30f6 100644 --- a/src/OLED/HomeMenuSelScreen.cpp +++ b/src/OLED/HomeMenuSelScreen.cpp @@ -133,7 +133,7 @@ CHomeMenuSelScreen::keyHandler(uint8_t event) // UP press if(event & key_Up) { if(_rowSel == 4) { - _showStoringMessage(); + _enableStoringMessage(); us = NVstore.getUserSettings(); us.HomeMenu = _action; NVstore.setUserSettings(us); diff --git a/src/OLED/InheritSettingsScreen.cpp b/src/OLED/InheritSettingsScreen.cpp index be5fb5a..00bffe7 100644 --- a/src/OLED/InheritSettingsScreen.cpp +++ b/src/OLED/InheritSettingsScreen.cpp @@ -105,7 +105,7 @@ CInheritSettingsScreen::keyHandler(uint8_t event) setFanSensor(getHeaterInfo().getFan_Sensor()); setSystemVoltage(getHeaterInfo().getSystemVoltage()); saveNV(); - _showStoringMessage(); + _enableStoringMessage(); _nAdoptSettings = 0; // will cause return to main menu after storing message expires } } diff --git a/src/OLED/MenuTrunkScreen.cpp b/src/OLED/MenuTrunkScreen.cpp new file mode 100644 index 0000000..7593086 --- /dev/null +++ b/src/OLED/MenuTrunkScreen.cpp @@ -0,0 +1,149 @@ +/* + * This file is part of the "bluetoothheater" distribution + * (https://gitlab.com/mrjones.id.au/bluetoothheater) + * + * Copyright (C) 2018 Ray Jones + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +#include "MenuTrunkScreen.h" +#include "KeyPad.h" +#include "../Utility/helpers.h" +#include "../Utility/macros.h" +#include "fonts/Arial.h" + +/////////////////////////////////////////////////////////////////////////// +// +// CMenuTrunkScreen +// +// This screen presents Bluetooth status information +// +/////////////////////////////////////////////////////////////////////////// + + +static const int LIMIT_AWAY = 0; +static const int LIMIT_LEFT = 1; +static const int LIMIT_RIGHT = 2; + +CMenuTrunkScreen::CMenuTrunkScreen(C128x64_OLED& display, CScreenManager& mgr) : CScreen(display, mgr) +{ + _initUI(); +} + +void +CMenuTrunkScreen::onSelect() +{ + CScreen::onSelect(); +// _initUI(); +} + +void +CMenuTrunkScreen::_initUI() +{ + _rowSel = 0; + _colSel = 0; +} + +bool +CMenuTrunkScreen::show() +{ + _display.clearDisplay(); + + CScreen::show(); + + int yPos[] = { 53, 41, 29, 17 }; + + _showTitle("Menu Trunk"); + + _printMenuText(_display.xCentre(), yPos[_rowSel], " \021 \020 ", true, eCentreJustify); + + _printMenuText(_display.xCentre(), yPos[3], "Heater Tuning", false, eCentreJustify); + _printMenuText(_display.xCentre(), yPos[2], "System Settings", false, eCentreJustify); + _printMenuText(_display.xCentre(), yPos[1], "User Settings", false, eCentreJustify); + _printMenuText(_display.xCentre(), yPos[0], "Root menu", false, eCentreJustify); + + return true; +} + +bool +CMenuTrunkScreen::keyHandler(uint8_t event) +{ + if(event & keyPressed) { + // press CENTRE + if(event & key_Centre) { + _rowSel = 0; + } + // press LEFT + if(event & key_Left) { + switch(_rowSel) { + case 0: + _ScreenManager.selectMenu(CScreenManager::RootMenuLoop); + _ScreenManager.prevMenu(); + break; + case 1: + _ScreenManager.selectMenu(CScreenManager::UserSettingsLoop); +// _ScreenManager.prevMenu(); + break; + case 2: + _ScreenManager.selectMenu(CScreenManager::SystemSettingsLoop); +// _ScreenManager.prevMenu(); + break; + case 3: + _ScreenManager.selectMenu(CScreenManager::BranchMenu, CScreenManager::HtrSettingsUI); +// _ScreenManager.selectMenu(CScreenManager::TuningMenuLoop); +// _ScreenManager.prevMenu(); + break; + } + } + // press RIGHT + if(event & key_Right) { + switch(_rowSel) { + case 0: + _ScreenManager.selectMenu(CScreenManager::RootMenuLoop); + _ScreenManager.nextMenu(); + break; + case 1: + _ScreenManager.selectMenu(CScreenManager::UserSettingsLoop); +// _ScreenManager.nextMenu(); + break; + case 2: + _ScreenManager.selectMenu(CScreenManager::SystemSettingsLoop); +// _ScreenManager.nextMenu(); + break; + case 3: + _ScreenManager.selectMenu(CScreenManager::BranchMenu, CScreenManager::HtrSettingsUI); + +// _ScreenManager.selectMenu(CScreenManager::TuningMenuLoop); +// _ScreenManager.nextMenu(); + break; + } + } + // press UP + if(event & key_Up) { + _rowSel++; + UPPERLIMIT(_rowSel, 3); + } + // press DOWN + if(event & key_Down) { + _rowSel--; + LOWERLIMIT(_rowSel, 0); + } + _ScreenManager.reqUpdate(); + } + + return true; +} + diff --git a/src/OLED/MenuTrunkScreen.h b/src/OLED/MenuTrunkScreen.h new file mode 100644 index 0000000..d1e8c7a --- /dev/null +++ b/src/OLED/MenuTrunkScreen.h @@ -0,0 +1,42 @@ +/* + * This file is part of the "bluetoothheater" distribution + * (https://gitlab.com/mrjones.id.au/bluetoothheater) + * + * Copyright (C) 2018 Ray Jones + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +#ifndef __MENUTRUNKSCREEN_H__ +#define __MENUTRUNKSCREEN_H__ + +#include +#include "Screen.h" + +class C128x64_OLED; +class CScreenManager; + +class CMenuTrunkScreen : public CScreen { +public: + CMenuTrunkScreen(C128x64_OLED& display, CScreenManager& mgr); + void onSelect(); + bool show(); + bool keyHandler(uint8_t event); +private: + int _rowSel, _colSel; + void _initUI(); +}; + +#endif diff --git a/src/OLED/OtherOptionsScreen.cpp b/src/OLED/OtherOptionsScreen.cpp index 73e4399..c03100a 100644 --- a/src/OLED/OtherOptionsScreen.cpp +++ b/src/OLED/OtherOptionsScreen.cpp @@ -147,7 +147,7 @@ COtherOptionsScreen::keyHandler(uint8_t event) settings.FrameRate = _frameRate; NVstore.setUserSettings(settings); NVstore.save(); - _showStoringMessage(); + _enableStoringMessage(); _rowSel = 0; } else { diff --git a/src/OLED/PasswordScreen.cpp b/src/OLED/PasswordScreen.cpp index 62aa328..30a1053 100644 --- a/src/OLED/PasswordScreen.cpp +++ b/src/OLED/PasswordScreen.cpp @@ -64,11 +64,7 @@ CPasswordScreen::show() if(_SaveTime) { _display.clearDisplay(); -// _printInverted(_display.xCentre(), 28, " ", true, eCentreJustify); -// _printInverted(_display.xCentre(), 39, " ", true, eCentreJustify); - _display.writeFillRect(34, 26, 60, 26, WHITE); - CTransientFont AF(_display, &arial_8ptBoldFontInfo); - _printInverted(_display.xCentre(), 32, " STORING ", true, eCentreJustify); + _showStoringMessage(); return true; } else if(_bGetPassword) { @@ -204,16 +200,10 @@ CPasswordScreen::_getPassword() } void -CPasswordScreen::_showStoringMessage() +CPasswordScreen::_enableStoringMessage() { _SaveTime = millis() + 1500; _ScreenManager.reqUpdate(); } -void -CPasswordScreen::_showConfirmMessage() -{ - _showTitle("Saving Settings"); - _printMenuText(_display.xCentre(), 35, "Press UP to", false, eCentreJustify); - _printMenuText(_display.xCentre(), 43, "confirm save", false, eCentreJustify); -} + diff --git a/src/OLED/PasswordScreen.h b/src/OLED/PasswordScreen.h index 4a4cd35..465d946 100644 --- a/src/OLED/PasswordScreen.h +++ b/src/OLED/PasswordScreen.h @@ -37,10 +37,9 @@ protected: bool _showPassword(); void _getPassword(); bool _isPasswordOK() { return _bPasswordOK; }; - void _showStoringMessage(); + void _enableStoringMessage(); void _initUI(); bool _busy(); - void _showConfirmMessage(); public: CPasswordScreen(C128x64_OLED& display, CScreenManager& mgr); void onSelect(); diff --git a/src/OLED/Screen.cpp b/src/OLED/Screen.cpp index 6c5cc3e..8a4bc8c 100644 --- a/src/OLED/Screen.cpp +++ b/src/OLED/Screen.cpp @@ -183,10 +183,26 @@ void CScreen::_showTitle(const char* title) { CTransientFont AF(_display, &arial_8ptBoldFontInfo); - _printMenuText(_display.xCentre(), -2, title, false, eCentreJustify); + _printMenuText(_display.xCentre(), -1, title, false, eCentreJustify); _display.drawFastHLine(0, 10, 128, WHITE); } +void +CScreen::_showConfirmMessage() +{ + _showTitle("Saving Settings"); + _printMenuText(_display.xCentre(), 35, "Press UP to", false, eCentreJustify); + _printMenuText(_display.xCentre(), 43, "confirm save", false, eCentreJustify); +} + +void +CScreen::_showStoringMessage() +{ + _display.writeFillRect(34, 19, 60, 26, WHITE); + CTransientFont AF(_display, &arial_8ptBoldFontInfo); + _printInverted(_display.xCentre(), 25, " STORING ", true, eCentreJustify); +} + // a class used for temporary alternate fonts usage // Reverts to standard inbuilt font when the instance falls out of scope diff --git a/src/OLED/Screen.h b/src/OLED/Screen.h index ee4e046..7930c44 100644 --- a/src/OLED/Screen.h +++ b/src/OLED/Screen.h @@ -57,6 +57,8 @@ protected: void _reqOEMWarning(); void _drawBitmap(int x, int y, const BITMAP_INFO& info, uint16_t color = WHITE, uint16_t bg = 0xffff); void _showTitle(const char* title); + void _showConfirmMessage(); + void _showStoringMessage(); public: CScreen(C128x64_OLED& disp, CScreenManager& mgr); virtual ~CScreen(); diff --git a/src/OLED/SetClockScreen.cpp b/src/OLED/SetClockScreen.cpp index 9275d2b..e8dd336 100644 --- a/src/OLED/SetClockScreen.cpp +++ b/src/OLED/SetClockScreen.cpp @@ -83,12 +83,11 @@ CSetClockScreen::show() } if(_SaveTime) { + _showStoringMessage(); long tDelta = millis() - _SaveTime; - if(tDelta > 0) + if(tDelta > 0) { _SaveTime = 0; - _printInverted(_display.xCentre(), 28, " ", true, eCentreJustify); - _printInverted(_display.xCentre(), 39, " ", true, eCentreJustify); - _printInverted(_display.xCentre(), 34, " STORING ", true, eCentreJustify); + } } else { yPos = 28; diff --git a/src/OLED/SetTimerScreen.cpp b/src/OLED/SetTimerScreen.cpp index 105bff6..f980f2f 100644 --- a/src/OLED/SetTimerScreen.cpp +++ b/src/OLED/SetTimerScreen.cpp @@ -33,10 +33,11 @@ #include "../Utility/helpers.h" #include "../../lib/RTClib/RTClib.h" #include "../RTC/TimerManager.h" +#include "fonts/Arial.h" const char* briefDOW[] = { "S", "M", "T", "W", "T", "F", "S" }; -CSetTimerScreen::CSetTimerScreen(C128x64_OLED& display, CScreenManager& mgr, int instance) : CScreenHeader(display, mgr) +CSetTimerScreen::CSetTimerScreen(C128x64_OLED& display, CScreenManager& mgr, int instance) : CScreen(display, mgr) { _initUI(); _ConflictTime = 0; @@ -47,7 +48,7 @@ CSetTimerScreen::CSetTimerScreen(C128x64_OLED& display, CScreenManager& mgr, int void CSetTimerScreen::onSelect() { - CScreenHeader::onSelect(); + CScreen::onSelect(); _initUI(); NVstore.getTimerInfo(_timerID, _timerInfo); } @@ -63,7 +64,9 @@ CSetTimerScreen::_initUI() bool CSetTimerScreen::show() { - CScreenHeader::show(false); + CScreen::show(); + + _display.clearDisplay(); char str[20]; int xPos, yPos; @@ -71,35 +74,22 @@ CSetTimerScreen::show() if(_rowSel == 0) { NVstore.getTimerInfo(_timerID, _timerInfo); } - sprintf(str, " Set Timer %d ", _timerID + 1); - _printInverted(0, 15, str, true); + sprintf(str, "Set Timer #%d", _timerID + 1); + _showTitle(str); if(_SaveTime) { + _showStoringMessage(); long tDelta = millis() - _SaveTime; - if(tDelta > 0) + if(tDelta > 0) { _SaveTime = 0; - _printInverted(_display.xCentre(), 28, " ", true, eCentreJustify); - _printInverted(_display.xCentre(), 39, " ", true, eCentreJustify); - _printInverted(_display.xCentre(), 34, " STORING ", true, eCentreJustify); + } } else if(_ConflictTime) { long tDelta = millis() - _ConflictTime; if(tDelta > 0) _ConflictTime = 0; sprintf(str, " with Timer %d ", _conflictID); - if(_conflictID >= 10) { - // extra space - _printInverted(_display.xCentre(), 26, " ", true, eCentreJustify); - _printInverted(_display.xCentre(), 45, " ", true, eCentreJustify); - _printInverted(_display.xCentre(), 30, " Conflicts ", true, eCentreJustify); - _printInverted(_display.xCentre(), 38, str, true, eCentreJustify); - } - else { - _printInverted(_display.xCentre(), 26, " ", true, eCentreJustify); - _printInverted(_display.xCentre(), 45, " ", true, eCentreJustify); - _printInverted(_display.xCentre(), 30, " Conflicts ", true, eCentreJustify); - _printInverted(_display.xCentre(), 38, str, true, eCentreJustify); - } + _showConflict(str); } else { // start @@ -140,22 +130,23 @@ CSetTimerScreen::show() _printMenuText(xPos, yPos, msg, _colSel==5, eRightJustify); else _printInverted(xPos, yPos, msg, _timerInfo.repeat, eRightJustify); - } - // navigation line - yPos = 53; - xPos = _display.xCentre(); - if(_rowSel == 2) { - _display.drawFastHLine(0, 53, 128, WHITE); - _printMenuText(_display.xCentre(), 57, "\033\032 Sel \030\031 Adj", false, eCentreJustify); - _printMenuText(_display.xCentre(), 57, "Done", false, eCentreJustify); - } - else if(_rowSel == 1) { - _display.drawFastHLine(0, 53, 128, WHITE); - _printMenuText(_display.xCentre(), 57, "\033\032 Sel \030\031 Adj", false, eCentreJustify); - _printMenuText(_display.xCentre(), 57, "Save", false, eCentreJustify); - } - else { - _printMenuText(xPos, yPos, " \021 Exit \020 ", _rowSel==0, eCentreJustify); + + // navigation line + yPos = 53; + xPos = _display.xCentre(); + if(_rowSel == 2) { + _display.drawFastHLine(0, 53, 128, WHITE); + _printMenuText(_display.xCentre(), 57, "\033\032 Sel \030\031 Adj", false, eCentreJustify); + _printMenuText(_display.xCentre(), 57, "Done", false, eCentreJustify); + } + else if(_rowSel == 1) { + _display.drawFastHLine(0, 53, 128, WHITE); + _printMenuText(_display.xCentre(), 57, "\033\032 Sel \030\031 Adj", false, eCentreJustify); + _printMenuText(_display.xCentre(), 57, "Save", false, eCentreJustify); + } + else { + _printMenuText(xPos, yPos, " \021 Exit \020 ", _rowSel==0, eCentreJustify); + } } return true; @@ -394,4 +385,13 @@ CSetTimerScreen::_printEnabledTimers() } } } - \ No newline at end of file + +void +CSetTimerScreen::_showConflict(const char* str) +{ + CTransientFont AF(_display, &arial_8ptBoldFontInfo); + _display.fillRect(19, 22, 90, 36, WHITE); + _printInverted(_display.xCentre(), 39, str, true, eCentreJustify); + _printInverted(_display.xCentre(), 28, "Conflicts", true, eCentreJustify); +} + \ No newline at end of file diff --git a/src/OLED/SetTimerScreen.h b/src/OLED/SetTimerScreen.h index 0f79862..20b5371 100644 --- a/src/OLED/SetTimerScreen.h +++ b/src/OLED/SetTimerScreen.h @@ -30,7 +30,7 @@ class C128x64_OLED; class CScreenManager; class CProtocol; -class CSetTimerScreen : public CScreenHeader { +class CSetTimerScreen : public CScreen { int _rowSel; int _colSel; int _timerID; @@ -41,7 +41,7 @@ class CSetTimerScreen : public CScreenHeader { void _adjust(int dir); void _printEnabledTimers(); void _initUI(); - + void _showConflict(const char* str); public: CSetTimerScreen(C128x64_OLED& display, CScreenManager& mgr, int instance); void onSelect(); diff --git a/src/OLED/ThermostatModeScreen.cpp b/src/OLED/ThermostatModeScreen.cpp index 5ec92f8..15fea19 100644 --- a/src/OLED/ThermostatModeScreen.cpp +++ b/src/OLED/ThermostatModeScreen.cpp @@ -254,7 +254,7 @@ CThermostatModeScreen::keyHandler(uint8_t event) UPPERLIMIT(_rowSel, 4); break; case 10: // confirmed save - _showStoringMessage(); + _enableStoringMessage(); settings = NVstore.getUserSettings(); settings.ThermostatMethod = _thermoMode; settings.ThermostatWindow = _window; diff --git a/src/OLED/VersionInfoScreen.cpp b/src/OLED/VersionInfoScreen.cpp index d63fef7..f4eac46 100644 --- a/src/OLED/VersionInfoScreen.cpp +++ b/src/OLED/VersionInfoScreen.cpp @@ -174,7 +174,7 @@ CVersionInfoScreen::keyHandler(uint8_t event) BoardRevisionReset(); NVstore.init(); NVstore.save(); - _showStoringMessage(); + _enableStoringMessage(); _rowSel = 11; } else { diff --git a/src/OLED/fonts/Arial.c b/src/OLED/fonts/Arial.c index 7343f46..23acce1 100644 --- a/src/OLED/fonts/Arial.c +++ b/src/OLED/fonts/Arial.c @@ -1481,790 +1481,791 @@ const FONT_INFO arial_7ptFontInfo = const uint8_t PROGMEM arial_8ptBoldBitmaps [] = { // @0 ' ' (2 pixels wide) - 0x00, 0x00, // - 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // // @4 '!' (2 pixels wide) - 0x1F, 0x60, // ##### ## - 0x1F, 0x60, // ##### ## + 0x7D, 0x80, // ##### ## + 0x7D, 0x80, // ##### ## // @8 '"' (5 pixels wide) - 0x1C, 0x00, // ### - 0x1C, 0x00, // ### - 0x00, 0x00, // - 0x1C, 0x00, // ### - 0x1C, 0x00, // ### + 0x70, 0x00, // ### + 0x70, 0x00, // ### + 0x00, 0x00, // + 0x70, 0x00, // ### + 0x70, 0x00, // ### // @18 '#' (6 pixels wide) - 0x04, 0xE0, // # ### - 0x07, 0x80, // #### - 0x1C, 0x80, // ### # - 0x04, 0xE0, // # ### - 0x07, 0x80, // #### - 0x1C, 0x80, // ### # + 0x13, 0x80, // # ### + 0x1E, 0x00, // #### + 0x72, 0x00, // ### # + 0x13, 0x80, // # ### + 0x1E, 0x00, // #### + 0x72, 0x00, // ### # // @30 '$' (5 pixels wide) - 0x0E, 0x40, // ### # - 0x13, 0x20, // # ## # - 0x3F, 0xF0, // ########## - 0x13, 0x20, // # ## # - 0x09, 0xC0, // # ### + 0x39, 0x00, // ### # + 0x4C, 0x80, // # ## # + 0xFF, 0xC0, // ########## + 0x4C, 0x80, // # ## # + 0x27, 0x00, // # ### // @40 '%' (8 pixels wide) - 0x1E, 0x00, // #### - 0x12, 0x00, // # # - 0x1E, 0x60, // #### ## - 0x01, 0x80, // ## - 0x06, 0x00, // ## - 0x19, 0xE0, // ## #### - 0x01, 0x20, // # # - 0x01, 0xE0, // #### + 0x78, 0x00, // #### + 0x48, 0x00, // # # + 0x79, 0x80, // #### ## + 0x06, 0x00, // ## + 0x18, 0x00, // ## + 0x67, 0x80, // ## #### + 0x04, 0x80, // # # + 0x07, 0x80, // #### // @56 '&' (7 pixels wide) - 0x00, 0xC0, // ## - 0x0D, 0xE0, // ## #### - 0x1F, 0x20, // ##### # - 0x13, 0x20, // # ## # - 0x1D, 0xE0, // ### #### - 0x0C, 0xE0, // ## ### - 0x01, 0xA0, // ## # + 0x03, 0x00, // ## + 0x37, 0x80, // ## #### + 0x7C, 0x80, // ##### # + 0x4C, 0x80, // # ## # + 0x77, 0x80, // ### #### + 0x33, 0x80, // ## ### + 0x06, 0x80, // ## # // @70 ''' (2 pixels wide) - 0x1C, 0x00, // ### - 0x1C, 0x00, // ### + 0x70, 0x00, // ### + 0x70, 0x00, // ### // @74 '(' (3 pixels wide) - 0x07, 0xC0, // ##### - 0x0F, 0xF0, // ######## - 0x18, 0x18, // ## ## + 0x1F, 0x00, // ##### + 0x3F, 0xC0, // ######## + 0x60, 0x60, // ## ## // @80 ')' (3 pixels wide) - 0x10, 0x18, // # ## - 0x0F, 0xF0, // ######## - 0x03, 0xC0, // #### + 0x40, 0x60, // # ## + 0x3F, 0xC0, // ######## + 0x0F, 0x00, // #### // @86 '*' (3 pixels wide) - 0x0A, 0x00, // # # - 0x1C, 0x00, // ### - 0x0A, 0x00, // # # + 0x28, 0x00, // # # + 0x70, 0x00, // ### + 0x28, 0x00, // # # // @92 '+' (5 pixels wide) - 0x01, 0x00, // # - 0x01, 0x00, // # - 0x07, 0xC0, // ##### - 0x01, 0x00, // # - 0x01, 0x00, // # + 0x04, 0x00, // # + 0x04, 0x00, // # + 0x1F, 0x00, // ##### + 0x04, 0x00, // # + 0x04, 0x00, // # // @102 ',' (2 pixels wide) - 0x00, 0x68, // ## # - 0x00, 0x70, // ### + 0x01, 0xA0, // ## # + 0x01, 0xC0, // ### // @106 '-' (3 pixels wide) - 0x00, 0x80, // # - 0x00, 0x80, // # - 0x00, 0x80, // # + 0x02, 0x00, // # + 0x02, 0x00, // # + 0x02, 0x00, // # // @112 '.' (2 pixels wide) - 0x00, 0x60, // ## - 0x00, 0x60, // ## + 0x01, 0x80, // ## + 0x01, 0x80, // ## // @116 '/' (3 pixels wide) - 0x00, 0x60, // ## - 0x07, 0x80, // #### - 0x18, 0x00, // ## + 0x01, 0x80, // ## + 0x1E, 0x00, // #### + 0x60, 0x00, // ## // @122 '0' (5 pixels wide) - 0x0F, 0xC0, // ###### - 0x1F, 0xE0, // ######## - 0x10, 0x20, // # # - 0x1F, 0xE0, // ######## - 0x0F, 0xC0, // ###### + 0x3F, 0x00, // ###### + 0x7F, 0x80, // ######## + 0x40, 0x80, // # # + 0x7F, 0x80, // ######## + 0x3F, 0x00, // ###### // @132 '1' (4 pixels wide) - 0x06, 0x00, // ## - 0x0C, 0x00, // ## - 0x1F, 0xE0, // ######## - 0x1F, 0xE0, // ######## + 0x18, 0x00, // ## + 0x30, 0x00, // ## + 0x7F, 0x80, // ######## + 0x7F, 0x80, // ######## // @140 '2' (5 pixels wide) - 0x08, 0x60, // # ## - 0x18, 0xE0, // ## ### - 0x11, 0xA0, // # ## # - 0x1F, 0x20, // ##### # - 0x0E, 0x20, // ### # + 0x21, 0x80, // # ## + 0x63, 0x80, // ## ### + 0x46, 0x80, // # ## # + 0x7C, 0x80, // ##### # + 0x38, 0x80, // ### # // @150 '3' (5 pixels wide) - 0x08, 0x40, // # # - 0x18, 0x60, // ## ## - 0x12, 0x20, // # # # - 0x1F, 0xE0, // ######## - 0x0D, 0xC0, // ## ### + 0x21, 0x00, // # # + 0x61, 0x80, // ## ## + 0x48, 0x80, // # # # + 0x7F, 0x80, // ######## + 0x37, 0x00, // ## ### // @160 '4' (6 pixels wide) - 0x01, 0x80, // ## - 0x06, 0x80, // ## # - 0x08, 0x80, // # # - 0x1F, 0xE0, // ######## - 0x1F, 0xE0, // ######## - 0x00, 0x80, // # + 0x06, 0x00, // ## + 0x1A, 0x00, // ## # + 0x22, 0x00, // # # + 0x7F, 0x80, // ######## + 0x7F, 0x80, // ######## + 0x02, 0x00, // # // @172 '5' (5 pixels wide) - 0x07, 0x40, // ### # - 0x1E, 0x60, // #### ## - 0x1A, 0x20, // ## # # - 0x13, 0xE0, // # ##### - 0x11, 0xC0, // # ### + 0x1D, 0x00, // ### # + 0x79, 0x80, // #### ## + 0x68, 0x80, // ## # # + 0x4F, 0x80, // # ##### + 0x47, 0x00, // # ### // @182 '6' (5 pixels wide) - 0x0F, 0xC0, // ###### - 0x1F, 0xE0, // ######## - 0x12, 0x20, // # # # - 0x1B, 0xE0, // ## ##### - 0x09, 0xC0, // # ### + 0x3F, 0x00, // ###### + 0x7F, 0x80, // ######## + 0x48, 0x80, // # # # + 0x6F, 0x80, // ## ##### + 0x27, 0x00, // # ### // @192 '7' (5 pixels wide) - 0x10, 0x00, // # - 0x11, 0xE0, // # #### - 0x17, 0xE0, // # ###### - 0x1E, 0x00, // #### - 0x18, 0x00, // ## + 0x40, 0x00, // # + 0x47, 0x80, // # #### + 0x5F, 0x80, // # ###### + 0x78, 0x00, // #### + 0x60, 0x00, // ## // @202 '8' (5 pixels wide) - 0x0D, 0xC0, // ## ### - 0x1F, 0xE0, // ######## - 0x12, 0x20, // # # # - 0x1F, 0xE0, // ######## - 0x0D, 0xC0, // ## ### + 0x37, 0x00, // ## ### + 0x7F, 0x80, // ######## + 0x48, 0x80, // # # # + 0x7F, 0x80, // ######## + 0x37, 0x00, // ## ### // @212 '9' (5 pixels wide) - 0x0E, 0x40, // ### # - 0x1F, 0x60, // ##### ## - 0x11, 0x20, // # # # - 0x1F, 0xE0, // ######## - 0x0F, 0xC0, // ###### + 0x39, 0x00, // ### # + 0x7D, 0x80, // ##### ## + 0x44, 0x80, // # # # + 0x7F, 0x80, // ######## + 0x3F, 0x00, // ###### // @222 ':' (2 pixels wide) - 0x06, 0x60, // ## ## - 0x06, 0x60, // ## ## + 0x19, 0x80, // ## ## + 0x19, 0x80, // ## ## // @226 ';' (2 pixels wide) - 0x06, 0x68, // ## ## # - 0x06, 0x70, // ## ### + 0x19, 0xA0, // ## ## # + 0x19, 0xC0, // ## ### // @230 '<' (5 pixels wide) - 0x03, 0x00, // ## - 0x03, 0x00, // ## - 0x04, 0x80, // # # - 0x04, 0x80, // # # - 0x08, 0x40, // # # + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x12, 0x00, // # # + 0x12, 0x00, // # # + 0x21, 0x00, // # # // @240 '=' (5 pixels wide) - 0x02, 0x80, // # # - 0x02, 0x80, // # # - 0x02, 0x80, // # # - 0x02, 0x80, // # # - 0x02, 0x80, // # # + 0x0A, 0x00, // # # + 0x0A, 0x00, // # # + 0x0A, 0x00, // # # + 0x0A, 0x00, // # # + 0x0A, 0x00, // # # // @250 '>' (5 pixels wide) - 0x08, 0x40, // # # - 0x04, 0x80, // # # - 0x04, 0x80, // # # - 0x03, 0x00, // ## - 0x03, 0x00, // ## + 0x21, 0x00, // # # + 0x12, 0x00, // # # + 0x12, 0x00, // # # + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## // @260 '?' (5 pixels wide) - 0x08, 0x00, // # - 0x19, 0x60, // ## # ## - 0x13, 0x60, // # ## ## - 0x1E, 0x00, // #### - 0x0C, 0x00, // ## + 0x20, 0x00, // # + 0x65, 0x80, // ## # ## + 0x4D, 0x80, // # ## ## + 0x78, 0x00, // #### + 0x30, 0x00, // ## // @270 '@' (10 pixels wide) - 0x03, 0xC0, // #### - 0x0C, 0x30, // ## ## - 0x09, 0xD0, // # ### # - 0x16, 0x28, // # ## # # - 0x14, 0x28, // # # # # - 0x14, 0x68, // # # ## # - 0x17, 0xE8, // # ###### # - 0x16, 0x28, // # ## # # - 0x08, 0x50, // # # # - 0x07, 0x90, // #### # + 0x0F, 0x00, // #### + 0x30, 0xC0, // ## ## + 0x27, 0x40, // # ### # + 0x58, 0xA0, // # ## # # + 0x50, 0xA0, // # # # # + 0x51, 0xA0, // # # ## # + 0x5F, 0xA0, // # ###### # + 0x58, 0xA0, // # ## # # + 0x21, 0x40, // # # # + 0x1E, 0x40, // #### # // @290 'A' (7 pixels wide) - 0x00, 0xE0, // ### - 0x07, 0xE0, // ###### - 0x1F, 0x80, // ###### - 0x18, 0x80, // ## # - 0x1F, 0x80, // ###### - 0x07, 0xE0, // ###### - 0x00, 0xE0, // ### + 0x03, 0x80, // ### + 0x1F, 0x80, // ###### + 0x7E, 0x00, // ###### + 0x62, 0x00, // ## # + 0x7E, 0x00, // ###### + 0x1F, 0x80, // ###### + 0x03, 0x80, // ### // @304 'B' (6 pixels wide) - 0x1F, 0xE0, // ######## - 0x1F, 0xE0, // ######## - 0x12, 0x20, // # # # - 0x12, 0x20, // # # # - 0x1F, 0xE0, // ######## - 0x0D, 0xC0, // ## ### + 0x7F, 0x80, // ######## + 0x7F, 0x80, // ######## + 0x48, 0x80, // # # # + 0x48, 0x80, // # # # + 0x7F, 0x80, // ######## + 0x37, 0x00, // ## ### // @316 'C' (7 pixels wide) - 0x07, 0x80, // #### - 0x0F, 0xC0, // ###### - 0x18, 0x60, // ## ## - 0x10, 0x20, // # # - 0x10, 0x20, // # # - 0x18, 0x60, // ## ## - 0x08, 0x40, // # # + 0x1E, 0x00, // #### + 0x3F, 0x00, // ###### + 0x61, 0x80, // ## ## + 0x40, 0x80, // # # + 0x40, 0x80, // # # + 0x61, 0x80, // ## ## + 0x21, 0x00, // # # // @330 'D' (6 pixels wide) - 0x1F, 0xE0, // ######## - 0x1F, 0xE0, // ######## - 0x10, 0x20, // # # - 0x10, 0x20, // # # - 0x1F, 0xE0, // ######## - 0x0F, 0xC0, // ###### + 0x7F, 0x80, // ######## + 0x7F, 0x80, // ######## + 0x40, 0x80, // # # + 0x40, 0x80, // # # + 0x7F, 0x80, // ######## + 0x3F, 0x00, // ###### // @342 'E' (5 pixels wide) - 0x1F, 0xE0, // ######## - 0x1F, 0xE0, // ######## - 0x12, 0x20, // # # # - 0x12, 0x20, // # # # - 0x12, 0x20, // # # # + 0x7F, 0x80, // ######## + 0x7F, 0x80, // ######## + 0x48, 0x80, // # # # + 0x48, 0x80, // # # # + 0x48, 0x80, // # # # // @352 'F' (5 pixels wide) - 0x1F, 0xE0, // ######## - 0x1F, 0xE0, // ######## - 0x12, 0x00, // # # - 0x12, 0x00, // # # - 0x12, 0x00, // # # + 0x7F, 0x80, // ######## + 0x7F, 0x80, // ######## + 0x48, 0x00, // # # + 0x48, 0x00, // # # + 0x48, 0x00, // # # // @362 'G' (7 pixels wide) - 0x07, 0x80, // #### - 0x0F, 0xC0, // ###### - 0x18, 0x60, // ## ## - 0x10, 0x20, // # # - 0x11, 0x20, // # # # - 0x19, 0xE0, // ## #### - 0x09, 0xC0, // # ### + 0x1E, 0x00, // #### + 0x3F, 0x00, // ###### + 0x61, 0x80, // ## ## + 0x40, 0x80, // # # + 0x44, 0x80, // # # # + 0x67, 0x80, // ## #### + 0x27, 0x00, // # ### // @376 'H' (6 pixels wide) - 0x1F, 0xE0, // ######## - 0x1F, 0xE0, // ######## - 0x02, 0x00, // # - 0x02, 0x00, // # - 0x1F, 0xE0, // ######## - 0x1F, 0xE0, // ######## + 0x7F, 0x80, // ######## + 0x7F, 0x80, // ######## + 0x08, 0x00, // # + 0x08, 0x00, // # + 0x7F, 0x80, // ######## + 0x7F, 0x80, // ######## // @388 'I' (2 pixels wide) - 0x1F, 0xE0, // ######## - 0x1F, 0xE0, // ######## + 0x7F, 0x80, // ######## + 0x7F, 0x80, // ######## // @392 'J' (5 pixels wide) - 0x00, 0x40, // # - 0x00, 0x60, // ## - 0x00, 0x20, // # - 0x1F, 0xE0, // ######## - 0x1F, 0xC0, // ####### + 0x01, 0x00, // # + 0x01, 0x80, // ## + 0x00, 0x80, // # + 0x7F, 0x80, // ######## + 0x7F, 0x00, // ####### // @402 'K' (6 pixels wide) - 0x1F, 0xE0, // ######## - 0x1F, 0xE0, // ######## - 0x03, 0x00, // ## - 0x0F, 0x80, // ##### - 0x1D, 0xE0, // ### #### - 0x10, 0x60, // # ## + 0x7F, 0x80, // ######## + 0x7F, 0x80, // ######## + 0x0C, 0x00, // ## + 0x3E, 0x00, // ##### + 0x77, 0x80, // ### #### + 0x41, 0x80, // # ## // @414 'L' (6 pixels wide) - 0x1F, 0xE0, // ######## - 0x1F, 0xE0, // ######## - 0x00, 0x20, // # - 0x00, 0x20, // # - 0x00, 0x20, // # - 0x00, 0x20, // # + 0x7F, 0x80, // ######## + 0x7F, 0x80, // ######## + 0x00, 0x80, // # + 0x00, 0x80, // # + 0x00, 0x80, // # + 0x00, 0x80, // # // @426 'M' (9 pixels wide) - 0x1F, 0xE0, // ######## - 0x1F, 0xE0, // ######## - 0x1E, 0x00, // #### - 0x07, 0xC0, // ##### - 0x00, 0xE0, // ### - 0x07, 0xC0, // ##### - 0x1E, 0x00, // #### - 0x1F, 0xE0, // ######## - 0x1F, 0xE0, // ######## + 0x7F, 0x80, // ######## + 0x7F, 0x80, // ######## + 0x78, 0x00, // #### + 0x1F, 0x00, // ##### + 0x03, 0x80, // ### + 0x1F, 0x00, // ##### + 0x78, 0x00, // #### + 0x7F, 0x80, // ######## + 0x7F, 0x80, // ######## // @444 'N' (6 pixels wide) - 0x1F, 0xE0, // ######## - 0x1F, 0xE0, // ######## - 0x06, 0x00, // ## - 0x01, 0x80, // ## - 0x1F, 0xE0, // ######## - 0x1F, 0xE0, // ######## + 0x7F, 0x80, // ######## + 0x7F, 0x80, // ######## + 0x18, 0x00, // ## + 0x06, 0x00, // ## + 0x7F, 0x80, // ######## + 0x7F, 0x80, // ######## // @456 'O' (7 pixels wide) - 0x07, 0x80, // #### - 0x0F, 0xC0, // ###### - 0x18, 0x60, // ## ## - 0x10, 0x20, // # # - 0x18, 0x60, // ## ## - 0x0F, 0xC0, // ###### - 0x07, 0x80, // #### + 0x1E, 0x00, // #### + 0x3F, 0x00, // ###### + 0x61, 0x80, // ## ## + 0x40, 0x80, // # # + 0x61, 0x80, // ## ## + 0x3F, 0x00, // ###### + 0x1E, 0x00, // #### // @470 'P' (6 pixels wide) - 0x1F, 0xE0, // ######## - 0x1F, 0xE0, // ######## - 0x11, 0x00, // # # - 0x11, 0x00, // # # - 0x1F, 0x00, // ##### - 0x0E, 0x00, // ### + 0x7F, 0x80, // ######## + 0x7F, 0x80, // ######## + 0x44, 0x00, // # # + 0x44, 0x00, // # # + 0x7C, 0x00, // ##### + 0x38, 0x00, // ### // @482 'Q' (7 pixels wide) - 0x07, 0x80, // #### - 0x0F, 0xC0, // ###### - 0x18, 0x60, // ## ## - 0x10, 0xA0, // # # # - 0x18, 0x60, // ## ## - 0x0F, 0xE0, // ####### - 0x07, 0x90, // #### # + 0x1E, 0x00, // #### + 0x3F, 0x00, // ###### + 0x61, 0x80, // ## ## + 0x42, 0x80, // # # # + 0x61, 0x80, // ## ## + 0x3F, 0x80, // ####### + 0x1E, 0x40, // #### # // @496 'R' (7 pixels wide) - 0x1F, 0xE0, // ######## - 0x1F, 0xE0, // ######## - 0x11, 0x00, // # # - 0x11, 0x80, // # ## - 0x1F, 0xC0, // ####### - 0x0E, 0x60, // ### ## - 0x00, 0x20, // # + 0x7F, 0x80, // ######## + 0x7F, 0x80, // ######## + 0x44, 0x00, // # # + 0x46, 0x00, // # ## + 0x7F, 0x00, // ####### + 0x39, 0x80, // ### ## + 0x00, 0x80, // # // @510 'S' (6 pixels wide) - 0x0E, 0x40, // ### # - 0x1E, 0x60, // #### ## - 0x13, 0x20, // # ## # - 0x13, 0x20, // # ## # - 0x19, 0xE0, // ## #### - 0x09, 0xC0, // # ### + 0x39, 0x00, // ### # + 0x79, 0x80, // #### ## + 0x4C, 0x80, // # ## # + 0x4C, 0x80, // # ## # + 0x67, 0x80, // ## #### + 0x27, 0x00, // # ### // @522 'T' (6 pixels wide) - 0x10, 0x00, // # - 0x10, 0x00, // # - 0x1F, 0xE0, // ######## - 0x1F, 0xE0, // ######## - 0x10, 0x00, // # - 0x10, 0x00, // # + 0x40, 0x00, // # + 0x40, 0x00, // # + 0x7F, 0x80, // ######## + 0x7F, 0x80, // ######## + 0x40, 0x00, // # + 0x40, 0x00, // # // @534 'U' (6 pixels wide) - 0x1F, 0xC0, // ####### - 0x1F, 0xE0, // ######## - 0x00, 0x20, // # - 0x00, 0x20, // # - 0x1F, 0xE0, // ######## - 0x1F, 0xC0, // ####### + 0x7F, 0x00, // ####### + 0x7F, 0x80, // ######## + 0x00, 0x80, // # + 0x00, 0x80, // # + 0x7F, 0x80, // ######## + 0x7F, 0x00, // ####### // @546 'V' (7 pixels wide) - 0x18, 0x00, // ## - 0x1F, 0x80, // ###### - 0x07, 0xE0, // ###### - 0x00, 0x60, // ## - 0x07, 0xE0, // ###### - 0x1F, 0x80, // ###### - 0x18, 0x00, // ## + 0x60, 0x00, // ## + 0x7E, 0x00, // ###### + 0x1F, 0x80, // ###### + 0x01, 0x80, // ## + 0x1F, 0x80, // ###### + 0x7E, 0x00, // ###### + 0x60, 0x00, // ## // @560 'W' (11 pixels wide) - 0x18, 0x00, // ## - 0x1F, 0x80, // ###### - 0x07, 0xE0, // ###### - 0x00, 0xE0, // ### - 0x0F, 0x80, // ##### - 0x1C, 0x00, // ### - 0x0F, 0x80, // ##### - 0x00, 0xE0, // ### - 0x07, 0xE0, // ###### - 0x1F, 0x80, // ###### - 0x18, 0x00, // ## + 0x60, 0x00, // ## + 0x7E, 0x00, // ###### + 0x1F, 0x80, // ###### + 0x03, 0x80, // ### + 0x3E, 0x00, // ##### + 0x70, 0x00, // ### + 0x3E, 0x00, // ##### + 0x03, 0x80, // ### + 0x1F, 0x80, // ###### + 0x7E, 0x00, // ###### + 0x60, 0x00, // ## // @582 'X' (6 pixels wide) - 0x18, 0x60, // ## ## - 0x1C, 0xE0, // ### ### - 0x07, 0x80, // #### - 0x07, 0x80, // #### - 0x1C, 0xE0, // ### ### - 0x18, 0x60, // ## ## + 0x61, 0x80, // ## ## + 0x73, 0x80, // ### ### + 0x1E, 0x00, // #### + 0x1E, 0x00, // #### + 0x73, 0x80, // ### ### + 0x61, 0x80, // ## ## // @594 'Y' (6 pixels wide) - 0x18, 0x00, // ## - 0x1E, 0x00, // #### - 0x03, 0xE0, // ##### - 0x03, 0xE0, // ##### - 0x1E, 0x00, // #### - 0x18, 0x00, // ## + 0x60, 0x00, // ## + 0x78, 0x00, // #### + 0x0F, 0x80, // ##### + 0x0F, 0x80, // ##### + 0x78, 0x00, // #### + 0x60, 0x00, // ## // @606 'Z' (6 pixels wide) - 0x10, 0x60, // # ## - 0x10, 0xE0, // # ### - 0x13, 0xA0, // # ### # - 0x17, 0x20, // # ### # - 0x1C, 0x20, // ### # - 0x18, 0x20, // ## # + 0x41, 0x80, // # ## + 0x43, 0x80, // # ### + 0x4E, 0x80, // # ### # + 0x5C, 0x80, // # ### # + 0x70, 0x80, // ### # + 0x60, 0x80, // ## # // @618 '[' (3 pixels wide) - 0x1F, 0xF8, // ########## - 0x1F, 0xF8, // ########## - 0x10, 0x08, // # # + 0x7F, 0xE0, // ########## + 0x7F, 0xE0, // ########## + 0x40, 0x20, // # # // @624 '\' (3 pixels wide) - 0x18, 0x00, // ## - 0x07, 0x80, // #### - 0x00, 0x60, // ## + 0x60, 0x00, // ## + 0x1E, 0x00, // #### + 0x01, 0x80, // ## // @630 ']' (3 pixels wide) - 0x10, 0x08, // # # - 0x1F, 0xF8, // ########## - 0x1F, 0xF8, // ########## + 0x40, 0x20, // # # + 0x7F, 0xE0, // ########## + 0x7F, 0xE0, // ########## // @636 '^' (5 pixels wide) - 0x02, 0x00, // # - 0x0E, 0x00, // ### - 0x18, 0x00, // ## - 0x0E, 0x00, // ### - 0x02, 0x00, // # + 0x08, 0x00, // # + 0x38, 0x00, // ### + 0x60, 0x00, // ## + 0x38, 0x00, // ### + 0x08, 0x00, // # // @646 '_' (6 pixels wide) - 0x00, 0x08, // # - 0x00, 0x08, // # - 0x00, 0x08, // # - 0x00, 0x08, // # - 0x00, 0x08, // # - 0x00, 0x08, // # + 0x00, 0x20, // # + 0x00, 0x20, // # + 0x00, 0x20, // # + 0x00, 0x20, // # + 0x00, 0x20, // # + 0x00, 0x20, // # // @658 '`' (3 pixels wide) - 0x10, 0x00, // # - 0x18, 0x00, // ## - 0x08, 0x00, // # + 0x40, 0x00, // # + 0x60, 0x00, // ## + 0x20, 0x00, // # // @664 'a' (5 pixels wide) - 0x02, 0xC0, // # ## - 0x05, 0xE0, // # #### - 0x05, 0x20, // # # # - 0x07, 0xE0, // ###### - 0x03, 0xE0, // ##### + 0x0B, 0x00, // # ## + 0x17, 0x80, // # #### + 0x14, 0x80, // # # # + 0x1F, 0x80, // ###### + 0x0F, 0x80, // ##### // @674 'b' (6 pixels wide) - 0x1F, 0xE0, // ######## - 0x1F, 0xE0, // ######## - 0x04, 0x20, // # # - 0x04, 0x20, // # # - 0x07, 0xE0, // ###### - 0x03, 0xC0, // #### + 0x7F, 0x80, // ######## + 0x7F, 0x80, // ######## + 0x10, 0x80, // # # + 0x10, 0x80, // # # + 0x1F, 0x80, // ###### + 0x0F, 0x00, // #### // @686 'c' (5 pixels wide) - 0x03, 0xC0, // #### - 0x07, 0xE0, // ###### - 0x04, 0x20, // # # - 0x06, 0x60, // ## ## - 0x02, 0x40, // # # + 0x0F, 0x00, // #### + 0x1F, 0x80, // ###### + 0x10, 0x80, // # # + 0x19, 0x80, // ## ## + 0x09, 0x00, // # # // @696 'd' (6 pixels wide) - 0x03, 0xC0, // #### - 0x07, 0xE0, // ###### - 0x04, 0x20, // # # - 0x04, 0x20, // # # - 0x1F, 0xE0, // ######## - 0x1F, 0xE0, // ######## + 0x0F, 0x00, // #### + 0x1F, 0x80, // ###### + 0x10, 0x80, // # # + 0x10, 0x80, // # # + 0x7F, 0x80, // ######## + 0x7F, 0x80, // ######## // @708 'e' (6 pixels wide) - 0x03, 0xC0, // #### - 0x07, 0xE0, // ###### - 0x05, 0x20, // # # # - 0x05, 0x20, // # # # - 0x07, 0x60, // ### ## - 0x03, 0x40, // ## # + 0x0F, 0x00, // #### + 0x1F, 0x80, // ###### + 0x14, 0x80, // # # # + 0x14, 0x80, // # # # + 0x1D, 0x80, // ### ## + 0x0D, 0x00, // ## # // @720 'f' (5 pixels wide) - 0x04, 0x00, // # - 0x0F, 0xE0, // ####### - 0x1F, 0xE0, // ######## - 0x14, 0x00, // # # - 0x10, 0x00, // # + 0x10, 0x00, // # + 0x3F, 0x80, // ####### + 0x7F, 0x80, // ######## + 0x50, 0x00, // # # + 0x40, 0x00, // # // @730 'g' (6 pixels wide) - 0x03, 0xD0, // #### # - 0x07, 0xE8, // ###### # - 0x04, 0x28, // # # # - 0x04, 0x28, // # # # - 0x07, 0xF8, // ######## - 0x07, 0xF0, // ####### + 0x0F, 0x40, // #### # + 0x1F, 0xA0, // ###### # + 0x10, 0xA0, // # # # + 0x10, 0xA0, // # # # + 0x1F, 0xE0, // ######## + 0x1F, 0xC0, // ####### // @742 'h' (6 pixels wide) - 0x1F, 0xE0, // ######## - 0x1F, 0xE0, // ######## - 0x04, 0x00, // # - 0x04, 0x00, // # - 0x07, 0xE0, // ###### - 0x03, 0xE0, // ##### + 0x7F, 0x80, // ######## + 0x7F, 0x80, // ######## + 0x10, 0x00, // # + 0x10, 0x00, // # + 0x1F, 0x80, // ###### + 0x0F, 0x80, // ##### // @754 'i' (2 pixels wide) - 0x17, 0xE0, // # ###### - 0x17, 0xE0, // # ###### + 0x5F, 0x80, // # ###### + 0x5F, 0x80, // # ###### // @758 'j' (3 pixels wide) - 0x00, 0x08, // # - 0x17, 0xF8, // # ######## - 0x17, 0xF0, // # ####### + 0x00, 0x20, // # + 0x5F, 0xE0, // # ######## + 0x5F, 0xC0, // # ####### // @764 'k' (6 pixels wide) - 0x1F, 0xE0, // ######## - 0x1F, 0xE0, // ######## - 0x01, 0x80, // ## - 0x03, 0xC0, // #### - 0x06, 0xE0, // ## ### - 0x04, 0x20, // # # + 0x7F, 0x80, // ######## + 0x7F, 0x80, // ######## + 0x06, 0x00, // ## + 0x0F, 0x00, // #### + 0x1B, 0x80, // ## ### + 0x10, 0x80, // # # // @776 'l' (2 pixels wide) - 0x1F, 0xE0, // ######## - 0x1F, 0xE0, // ######## + 0x7F, 0x80, // ######## + 0x7F, 0x80, // ######## // @780 'm' (10 pixels wide) - 0x07, 0xE0, // ###### - 0x07, 0xE0, // ###### - 0x04, 0x00, // # - 0x04, 0x00, // # - 0x07, 0xE0, // ###### - 0x07, 0xE0, // ###### - 0x04, 0x00, // # - 0x04, 0x00, // # - 0x07, 0xE0, // ###### - 0x03, 0xE0, // ##### + 0x1F, 0x80, // ###### + 0x1F, 0x80, // ###### + 0x10, 0x00, // # + 0x10, 0x00, // # + 0x1F, 0x80, // ###### + 0x1F, 0x80, // ###### + 0x10, 0x00, // # + 0x10, 0x00, // # + 0x1F, 0x80, // ###### + 0x0F, 0x80, // ##### // @800 'n' (6 pixels wide) - 0x07, 0xE0, // ###### - 0x07, 0xE0, // ###### - 0x04, 0x00, // # - 0x04, 0x00, // # - 0x07, 0xE0, // ###### - 0x03, 0xE0, // ##### + 0x1F, 0x80, // ###### + 0x1F, 0x80, // ###### + 0x10, 0x00, // # + 0x10, 0x00, // # + 0x1F, 0x80, // ###### + 0x0F, 0x80, // ##### // @812 'o' (6 pixels wide) - 0x03, 0xC0, // #### - 0x07, 0xE0, // ###### - 0x04, 0x20, // # # - 0x04, 0x20, // # # - 0x07, 0xE0, // ###### - 0x03, 0xC0, // #### + 0x0F, 0x00, // #### + 0x1F, 0x80, // ###### + 0x10, 0x80, // # # + 0x10, 0x80, // # # + 0x1F, 0x80, // ###### + 0x0F, 0x00, // #### // @824 'p' (6 pixels wide) - 0x07, 0xF8, // ######## - 0x07, 0xF8, // ######## - 0x04, 0x20, // # # - 0x04, 0x20, // # # - 0x07, 0xE0, // ###### - 0x03, 0xC0, // #### + 0x1F, 0xE0, // ######## + 0x1F, 0xE0, // ######## + 0x10, 0x80, // # # + 0x10, 0x80, // # # + 0x1F, 0x80, // ###### + 0x0F, 0x00, // #### // @836 'q' (6 pixels wide) - 0x03, 0xC0, // #### - 0x07, 0xE0, // ###### - 0x04, 0x20, // # # - 0x04, 0x20, // # # - 0x07, 0xF8, // ######## - 0x07, 0xF8, // ######## + 0x0F, 0x00, // #### + 0x1F, 0x80, // ###### + 0x10, 0x80, // # # + 0x10, 0x80, // # # + 0x1F, 0xE0, // ######## + 0x1F, 0xE0, // ######## // @848 'r' (4 pixels wide) - 0x07, 0xE0, // ###### - 0x07, 0xE0, // ###### - 0x04, 0x00, // # - 0x04, 0x00, // # + 0x1F, 0x80, // ###### + 0x1F, 0x80, // ###### + 0x10, 0x00, // # + 0x10, 0x00, // # // @856 's' (6 pixels wide) - 0x03, 0x40, // ## # - 0x07, 0x60, // ### ## - 0x05, 0xA0, // # ## # - 0x05, 0xA0, // # ## # - 0x06, 0xE0, // ## ### - 0x02, 0xC0, // # ## + 0x0D, 0x00, // ## # + 0x1D, 0x80, // ### ## + 0x16, 0x80, // # ## # + 0x16, 0x80, // # ## # + 0x1B, 0x80, // ## ### + 0x0B, 0x00, // # ## // @868 't' (4 pixels wide) - 0x04, 0x00, // # - 0x0F, 0xC0, // ###### - 0x1F, 0xE0, // ######## - 0x04, 0x20, // # # + 0x10, 0x00, // # + 0x3F, 0x00, // ###### + 0x7F, 0x80, // ######## + 0x10, 0x80, // # # // @876 'u' (6 pixels wide) - 0x07, 0xC0, // ##### - 0x07, 0xE0, // ###### - 0x00, 0x20, // # - 0x00, 0x20, // # - 0x07, 0xE0, // ###### - 0x07, 0xE0, // ###### + 0x1F, 0x00, // ##### + 0x1F, 0x80, // ###### + 0x00, 0x80, // # + 0x00, 0x80, // # + 0x1F, 0x80, // ###### + 0x1F, 0x80, // ###### // @888 'v' (5 pixels wide) - 0x07, 0x80, // #### - 0x07, 0xE0, // ###### - 0x00, 0x60, // ## - 0x07, 0xE0, // ###### - 0x07, 0x80, // #### + 0x1E, 0x00, // #### + 0x1F, 0x80, // ###### + 0x01, 0x80, // ## + 0x1F, 0x80, // ###### + 0x1E, 0x00, // #### // @898 'w' (9 pixels wide) - 0x07, 0x00, // ### - 0x07, 0xE0, // ###### - 0x00, 0xE0, // ### - 0x03, 0xC0, // #### - 0x07, 0x00, // ### - 0x03, 0xC0, // #### - 0x00, 0xE0, // ### - 0x07, 0xE0, // ###### - 0x07, 0x00, // ### + 0x1C, 0x00, // ### + 0x1F, 0x80, // ###### + 0x03, 0x80, // ### + 0x0F, 0x00, // #### + 0x1C, 0x00, // ### + 0x0F, 0x00, // #### + 0x03, 0x80, // ### + 0x1F, 0x80, // ###### + 0x1C, 0x00, // ### // @916 'x' (5 pixels wide) - 0x06, 0x60, // ## ## - 0x07, 0xE0, // ###### - 0x01, 0x80, // ## - 0x07, 0xE0, // ###### - 0x06, 0x60, // ## ## + 0x19, 0x80, // ## ## + 0x1F, 0x80, // ###### + 0x06, 0x00, // ## + 0x1F, 0x80, // ###### + 0x19, 0x80, // ## ## // @926 'y' (7 pixels wide) - 0x04, 0x08, // # # - 0x07, 0x88, // #### # - 0x03, 0xF8, // ####### - 0x00, 0x70, // ### - 0x03, 0xE0, // ##### - 0x07, 0x80, // #### - 0x04, 0x00, // # + 0x10, 0x20, // # # + 0x1E, 0x20, // #### # + 0x0F, 0xE0, // ####### + 0x01, 0xC0, // ### + 0x0F, 0x80, // ##### + 0x1E, 0x00, // #### + 0x10, 0x00, // # // @940 'z' (5 pixels wide) - 0x04, 0x60, // # ## - 0x04, 0xE0, // # ### - 0x05, 0xA0, // # ## # - 0x07, 0x20, // ### # - 0x06, 0x20, // ## # + 0x11, 0x80, // # ## + 0x13, 0x80, // # ### + 0x16, 0x80, // # ## # + 0x1C, 0x80, // ### # + 0x18, 0x80, // ## # // @950 '{' (4 pixels wide) - 0x00, 0x80, // # - 0x0F, 0xF0, // ######## - 0x1F, 0x78, // ##### #### - 0x10, 0x08, // # # + 0x02, 0x00, // # + 0x3F, 0xC0, // ######## + 0x7D, 0xE0, // ##### #### + 0x40, 0x20, // # # // @958 '|' (1 pixels wide) - 0x1F, 0xF8, // ########## + 0x7F, 0xE0, // ########## // @960 '}' (4 pixels wide) - 0x10, 0x08, // # # - 0x1F, 0x78, // ##### #### - 0x0F, 0xF0, // ######## - 0x00, 0x80, // # + 0x40, 0x20, // # # + 0x7D, 0xE0, // ##### #### + 0x3F, 0xC0, // ######## + 0x02, 0x00, // # // @968 '~' (5 pixels wide) - 0x01, 0x00, // # - 0x02, 0x00, // # - 0x02, 0x00, // # - 0x01, 0x00, // # - 0x02, 0x00, // # + 0x04, 0x00, // # + 0x08, 0x00, // # + 0x08, 0x00, // # + 0x04, 0x00, // # + 0x08, 0x00, // # }; // Character descriptors for Arial 8pt // { [Char width in bits], [Char height in bits], [Offset into arial_8ptCharBitmaps in bytes] } const FONT_CHAR_INFO PROGMEM arial_8ptBoldDescriptors[] = { - {2, 14, 0}, // ' ' - {2, 14, 4}, // '!' - {5, 14, 8}, // '"' - {6, 14, 18}, // '#' - {5, 14, 30}, // '$' - {8, 14, 40}, // '%' - {7, 14, 56}, // '&' - {2, 14, 70}, // ''' - {3, 14, 74}, // '(' - {3, 14, 80}, // ')' - {3, 14, 86}, // '*' - {5, 14, 92}, // '+' - {2, 14, 102}, // ',' - {3, 14, 106}, // '-' - {2, 14, 112}, // '.' - {3, 14, 116}, // '/' - {5, 14, 122}, // '0' - {4, 14, 132}, // '1' - {5, 14, 140}, // '2' - {5, 14, 150}, // '3' - {6, 14, 160}, // '4' - {5, 14, 172}, // '5' - {5, 14, 182}, // '6' - {5, 14, 192}, // '7' - {5, 14, 202}, // '8' - {5, 14, 212}, // '9' - {2, 14, 222}, // ':' - {2, 14, 226}, // ';' - {5, 14, 230}, // '<' - {5, 14, 240}, // '=' - {5, 14, 250}, // '>' - {5, 14, 260}, // '?' - {10, 14, 270}, // '@' - {7, 14, 290}, // 'A' - {6, 14, 304}, // 'B' - {7, 14, 316}, // 'C' - {6, 14, 330}, // 'D' - {5, 14, 342}, // 'E' - {5, 14, 352}, // 'F' - {7, 14, 362}, // 'G' - {6, 14, 376}, // 'H' - {2, 14, 388}, // 'I' - {5, 14, 392}, // 'J' - {6, 14, 402}, // 'K' - {6, 14, 414}, // 'L' - {9, 14, 426}, // 'M' - {6, 14, 444}, // 'N' - {7, 14, 456}, // 'O' - {6, 14, 470}, // 'P' - {7, 14, 482}, // 'Q' - {7, 14, 496}, // 'R' - {6, 14, 510}, // 'S' - {6, 14, 522}, // 'T' - {6, 14, 534}, // 'U' - {7, 14, 546}, // 'V' - {11, 14, 560}, // 'W' - {6, 14, 582}, // 'X' - {6, 14, 594}, // 'Y' - {6, 14, 606}, // 'Z' - {3, 14, 618}, // '[' - {3, 14, 624}, // '\' - {3, 14, 630}, // ']' - {5, 14, 636}, // '^' - {6, 14, 646}, // '_' - {3, 14, 658}, // '`' - {5, 14, 664}, // 'a' - {6, 14, 674}, // 'b' - {5, 14, 686}, // 'c' - {6, 14, 696}, // 'd' - {6, 14, 708}, // 'e' - {5, 14, 720}, // 'f' - {6, 14, 730}, // 'g' - {6, 14, 742}, // 'h' - {2, 14, 754}, // 'i' - {3, 14, 758}, // 'j' - {6, 14, 764}, // 'k' - {2, 14, 776}, // 'l' - {10, 14, 780}, // 'm' - {6, 14, 800}, // 'n' - {6, 14, 812}, // 'o' - {6, 14, 824}, // 'p' - {6, 14, 836}, // 'q' - {4, 14, 848}, // 'r' - {6, 14, 856}, // 's' - {4, 14, 868}, // 't' - {6, 14, 876}, // 'u' - {5, 14, 888}, // 'v' - {9, 14, 898}, // 'w' - {5, 14, 916}, // 'x' - {7, 14, 926}, // 'y' - {5, 14, 940}, // 'z' - {4, 14, 950}, // '{' - {1, 14, 958}, // '|' - {4, 14, 960}, // '}' - {5, 14, 968}, // '~' + {2, 11, 0}, // ' ' + {2, 11, 4}, // '!' + {5, 11, 8}, // '"' + {6, 11, 18}, // '#' + {5, 11, 30}, // '$' + {8, 11, 40}, // '%' + {7, 11, 56}, // '&' + {2, 11, 70}, // ''' + {3, 11, 74}, // '(' + {3, 11, 80}, // ')' + {3, 11, 86}, // '*' + {5, 11, 92}, // '+' + {2, 11, 102}, // ',' + {3, 11, 106}, // '-' + {2, 11, 112}, // '.' + {3, 11, 116}, // '/' + {5, 11, 122}, // '0' + {4, 11, 132}, // '1' + {5, 11, 140}, // '2' + {5, 11, 150}, // '3' + {6, 11, 160}, // '4' + {5, 11, 172}, // '5' + {5, 11, 182}, // '6' + {5, 11, 192}, // '7' + {5, 11, 202}, // '8' + {5, 11, 212}, // '9' + {2, 11, 222}, // ':' + {2, 11, 226}, // ';' + {5, 11, 230}, // '<' + {5, 11, 240}, // '=' + {5, 11, 250}, // '>' + {5, 11, 260}, // '?' + {10, 11, 270}, // '@' + {7, 11, 290}, // 'A' + {6, 11, 304}, // 'B' + {7, 11, 316}, // 'C' + {6, 11, 330}, // 'D' + {5, 11, 342}, // 'E' + {5, 11, 352}, // 'F' + {7, 11, 362}, // 'G' + {6, 11, 376}, // 'H' + {2, 11, 388}, // 'I' + {5, 11, 392}, // 'J' + {6, 11, 402}, // 'K' + {6, 11, 414}, // 'L' + {9, 11, 426}, // 'M' + {6, 11, 444}, // 'N' + {7, 11, 456}, // 'O' + {6, 11, 470}, // 'P' + {7, 11, 482}, // 'Q' + {7, 11, 496}, // 'R' + {6, 11, 510}, // 'S' + {6, 11, 522}, // 'T' + {6, 11, 534}, // 'U' + {7, 11, 546}, // 'V' + {11, 11, 560}, // 'W' + {6, 11, 582}, // 'X' + {6, 11, 594}, // 'Y' + {6, 11, 606}, // 'Z' + {3, 11, 618}, // '[' + {3, 11, 624}, // '\' + {3, 11, 630}, // ']' + {5, 11, 636}, // '^' + {6, 11, 646}, // '_' + {3, 11, 658}, // '`' + {5, 11, 664}, // 'a' + {6, 11, 674}, // 'b' + {5, 11, 686}, // 'c' + {6, 11, 696}, // 'd' + {6, 11, 708}, // 'e' + {5, 11, 720}, // 'f' + {6, 11, 730}, // 'g' + {6, 11, 742}, // 'h' + {2, 11, 754}, // 'i' + {3, 11, 758}, // 'j' + {6, 11, 764}, // 'k' + {2, 11, 776}, // 'l' + {10, 11, 780}, // 'm' + {6, 11, 800}, // 'n' + {6, 11, 812}, // 'o' + {6, 11, 824}, // 'p' + {6, 11, 836}, // 'q' + {4, 11, 848}, // 'r' + {6, 11, 856}, // 's' + {4, 11, 868}, // 't' + {6, 11, 876}, // 'u' + {5, 11, 888}, // 'v' + {9, 11, 898}, // 'w' + {5, 11, 916}, // 'x' + {7, 11, 926}, // 'y' + {5, 11, 940}, // 'z' + {4, 11, 950}, // '{' + {1, 11, 958}, // '|' + {4, 11, 960}, // '}' + {5, 11, 968}, // '~' }; + // Font information for Arial 8pt const FONT_INFO arial_8ptBoldFontInfo = { - 14, // Character height + 11, // Character height ' ', // Start character '~', // End character 1, // Width, in pixels, of space character