summaryrefslogtreecommitdiff
path: root/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'main.cpp')
-rw-r--r--main.cpp43
1 files changed, 0 insertions, 43 deletions
diff --git a/main.cpp b/main.cpp
index 11fe0b3..6dc9447 100644
--- a/main.cpp
+++ b/main.cpp
@@ -22,10 +22,6 @@
#include "ModeConfig.h"
// misc heders
#include <string>
-/*------------------------------------------------------*/
-#include "SensorHandler.h"
-/*------------------------------------------------------*/
-
// LCD and backlight controllers
SPI lcd_spi(SPI1_MOSI, SPI1_MISO, SPI1_SCK);
@@ -115,45 +111,6 @@ void mainMenu() {
items.push_back(menu_strings[single]);
items.push_back(menu_strings[sweep]);
-/*------------------------------------------------------*/
- SensorHandler *sensors = new SensorHandler();
- MMA845x_DATA accel;
- uint16_t light;
- int32_t num_whole;
- int16_t num_frac;
- uint32_t pressure;
- char txtstr[17];
- while(1){
- accel = sensors->getAcceleration();
- sprintf(txtstr, "Accel: x = %d", accel._x);
- printf("%s\r\n", txtstr);
- sprintf(txtstr, "y = %d", accel._y);
- printf("%s\r\n", txtstr);
- sprintf(txtstr, "z = %d", accel._z );
- printf("%s\r\n", txtstr);
- osDelay(2000);
-
- light = sensors->getLight();
- num_whole = light * 24 / 100; // 16000 lux full scale .24 lux per bit
- num_frac = light * 24 % 100;
- sprintf(txtstr, "Light=%ld.%02d lux", num_whole, num_frac );
- printf("%s\r\n", txtstr);
-
- pressure = ((sensors->getBarometer())._baro) >> 12; // convert 32 bit signed to 20 bit unsigned value
- num_whole = pressure >> 2; // 18 bit integer significant
- num_frac = (pressure & 0x3) * 25; // 2 bit fractional 0.25 per bit
- sprintf(txtstr,"Press=%ld.%02d Pa", num_whole, num_frac);
- printf("%s\r\n", txtstr);
-
- num_whole = ((sensors->getBarometer())._temp) / 16; // 8 bit signed significant integer
- num_frac = (((sensors->getBarometer())._temp) & 0x0F) * 625 / 100; // 4 bit fractional .0625 per bit
- sprintf(txtstr,"Temp=%ld.%03d C", num_whole, num_frac);
- printf("%s\r\n", txtstr);
- }
-
-/*------------------------------------------------------*/
-
-
while (true) {
// reset session between modes
dot->resetNetworkSession();