Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: SX1276Lib AdaFruit_RGBLCD MCP23017 mbed
Fork of AdaFruit_RGBLCD by
Diff: main.cpp
- Revision:
- 31:2c813f321db7
- Parent:
- 29:0ea07cc7124b
- Child:
- 32:a2472bbe7c92
--- a/main.cpp Tue Jun 16 11:56:16 2015 +0000 +++ b/main.cpp Tue Jul 14 14:58:23 2015 +0000 @@ -1,22 +1,22 @@ #include "mbed.h" #include "lcdadafruit.h" -#include "keyreaderadafruit.h" -#include "keyreadernull.h" -#include "RTclock.h" -#include "DateModule.h" -#include "TempModule.h" -#include "TimeModule.h" -#include "TitleModule.h" -#include "SyncModule.h" -#include "GPSModule.h" -#include "LatitudeModule.h" -#include "RadioModule.h" -#include "MenuManager.h" +//radfta #include "keyreaderadafruit.h" +//radfta #include "keyreadernull.h" +// #include "RTclock.h" +//#include "DateModule.h" +//#include "TempModule.h" +//#include "TimeModule.h" +//#include "TitleModule.h" +//#include "SyncModule.h" +//#include "GPSModule.h" +//#include "LatitudeModule.h" +//#include "RadioModule.h" +//#include "MenuManager.h" #include "sx1276-hal.h" #include "GPS.h" #include "main.h" #include "debug.h" -#include "vt100.h" +//#include "vt100.h" #include "serial_api.h" @@ -26,8 +26,8 @@ //#define RF_FREQUENCY 868000000 // Hz //#define RF_FREQUENCY 880030000 -//#define RF_FREQUENCY 915000000.0 // Hz -#define RF_FREQUENCY 413000000.0 // Hz +#define RF_FREQUENCY 915000000.0 // Hz +//#define RF_FREQUENCY 413000000.0 // Hz #define TX_OUTPUT_POWER 20 // 14 dBm #define LORA_BANDWIDTH 2 // [0: 125 kHz, // 1: 250 kHz, @@ -69,7 +69,7 @@ */ typedef RadioState States_t; volatile States_t State = LOWPOWER; -vt100 ctrl; +// radfta vt100 ctrl; SX1276MB1xAS Radio( OnTxDone, OnTxTimeout, OnRxDone, OnRxTimeout, OnRxError, NULL, NULL ); // for hand wired I2C cI2C(PTC9, PTC8); @@ -336,7 +336,7 @@ { int i; - gpsd.setBaud57600(); + // radfta gpsd.setBaud57600(); pc.baud(9600); //pc.baud(57600); cI2C.frequency(400000); // I2C can handle two different frequencies - switch to high speed if asked @@ -397,15 +397,7 @@ pc.printf("Starting GPS App\r\n"); } - while( 0 ) - { - static int count =1; - cLCD.setCursor(0,1); - wait(1); - cLCD.printf("%d ",count); - count++; - - } + while( 1 ) { // wait_ms( 50 ); @@ -434,42 +426,5 @@ } // ...switch (app) } - - - //KeyReaderNull cKeys(cI2C); -#if 0 - KeyReaderAdafruit cKeys(cI2C); - - RTclock cClock(cI2C, 0x68 << 1, RTclock::eDS3231); - - // Spin up RTC - cClock.mapTime(); - - // Set up display modules - Module * aModules[] = - { - //new TitleModule(cLCD,cClock), - // new TempModule(cLCD,cI2C,0x18 << 1), - // new TimeModule(cLCD,cClock), - // new DateModule(cLCD,cClock), - new RadioModule(cLCD,cClock), - new LatitudeModule(cLCD,cClock), - new GPSModule(cLCD,cClock), - }; - - - // Set up the menu manager - // MenuManager cMenuManager(aModules,_countof(aModules),cLCD,cKeys,16,2); - MenuManager cMenuManager(aModules,_countof(aModules),cLCD,cKeys); - - - // Start menu manager loop - - - - - cMenuManager.loop(); -#endif - }