From 9a9407a11dad3013a99cefbbc00ecf1db561eb3f Mon Sep 17 00:00:00 2001 From: Leon Lindenfelser Date: Mon, 7 Dec 2015 09:07:02 -0600 Subject: Removed print statement verification code from main.cpp and SensorHander.cpp. --- SensorHandler/SensorHandler.cpp | 5 ----- main.cpp | 43 ----------------------------------------- 2 files changed, 48 deletions(-) diff --git a/SensorHandler/SensorHandler.cpp b/SensorHandler/SensorHandler.cpp index 65cbbc3..33515f7 100644 --- a/SensorHandler/SensorHandler.cpp +++ b/SensorHandler/SensorHandler.cpp @@ -15,9 +15,7 @@ SensorHandler::SensorHandler() _barometricSensor(_mDoti2c), _lightSensor(_mDoti2c) { - printf("init Sensors"); SensorHandler::initSensors(); - printf("start Sensor thread"); _getSensorThread.signal_set(START_THREAD); return; } @@ -48,21 +46,18 @@ void SensorHandler::initSensors(){ // Clear the min-max registers in the Barometric Sensor _barometricSensor.clearMinMaxRegs(); - printf("Sensors initialized"); } void SensorHandler::startSensorThread(void const *p) { SensorHandler *instance = (SensorHandler*)p; instance->readSensors(); - printf("Sensor thread started"); } void SensorHandler::readSensors() { uint8_t result; _getSensorThread.signal_wait(START_THREAD); - printf("read Sensors"); while(1){ // Test Accelerometer XYZ data ready bit to see if acquisition complete do { 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 -/*------------------------------------------------------*/ -#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(); -- cgit v1.2.3