diff options
Diffstat (limited to 'main.cpp')
-rw-r--r-- | main.cpp | 22 |
1 files changed, 4 insertions, 18 deletions
@@ -1,24 +1,16 @@ #include "mbed.h" #include "rtos.h" -#include "font_6x8.h" -#include "MultiTech_Logo.h" - #include "DOGS102.h" #include "ISL29011.h" #include "MMA845x.h" #include "MPL3115A2.h" #include "NCP5623B.h" #include "GPSPARSER.h" +#include "DisplayManager.h" #include "mDot.h" #include "MTSLog.h" -#include "version.h" - -// product and version information -static const std::string product_name = "MTDOT-BOX/EVB"; -static const std::string program_name = "Factory Firmware"; -static const std::string program_version = std::string("Version ") + MTDOT_BOX_VERSION; // LCD and backlight controllers SPI lcd_spi(SPI1_MOSI, SPI1_MISO, SPI1_SCK); @@ -27,6 +19,7 @@ DigitalOut lcd_spi_cs(SPI1_CS, 1); DigitalOut lcd_cd(XBEE_ON_SLEEP, 1); DOGS102* lcd; NCP5623B* lcd_backlight; +DisplayManager* display; // Serial debug port Serial debug(USBTX, USBRX); @@ -37,17 +30,10 @@ int main() { lcd = new DOGS102(lcd_spi, lcd_spi_cs, lcd_cd); lcd_backlight = new NCP5623B(backlight_i2c); + display = new DisplayManager(lcd); logInfo("starting..."); - - lcd->startUpdate(); - lcd->writeBitmap(0, 0, MultiTech_Logo); - lcd->writeText(0, 3, font_6x8, product_name.c_str(), product_name.size()); - lcd->writeText(0, 4, font_6x8, program_name.c_str(), program_name.size()); - lcd->writeText(0, 5, font_6x8, program_version.c_str(), program_version.size()); - lcd->endUpdate(); - - logInfo("on screen"); + display->displaySplashScreen(); while (true) { logInfo("in loop"); |