diff --git a/software/app/application.cpp b/software/app/application.cpp index 600e5f7..e8c22da 100644 --- a/software/app/application.cpp +++ b/software/app/application.cpp @@ -2,6 +2,7 @@ #include #include #include "ads101x.h" +#include "hardware.h" #include "excitation_light.h" #include "sensor_hub.h" #include "sensor_settings.h" @@ -13,7 +14,7 @@ static const int HUB_PERIOD = 5; static const int ADC_TIMEBASE = 250; static const int ADC_PERIOD = 5; -static const uint8_t ADC_ADDRESS = 0x48; +//static const uint8_t ADC_ADDRESS = 0x48; using namespace rijnfel; @@ -94,9 +95,9 @@ void init() { WifiAccessPoint.config("Sensus", "", AUTH_OPEN, false, 3);*/ cWebInterface::GetInstance()->Start(); - procTimer.initializeMs(HUB_PERIOD, updateSensorHub).start(); + //procTimer.initializeMs(HUB_PERIOD, updateSensorHub).start(); //procTimer.initializeMs(1000, AdcTest).start(); - //procTimer.initializeMs(5000, SettingsTest).start(); + procTimer.initializeMs(5000, SettingsTest).start(); mylight.SetCurrent(5000); mylight.RectangleUpdate(); } diff --git a/software/app/excitation_light.cpp b/software/app/excitation_light.cpp index c9572bc..d079673 100644 --- a/software/app/excitation_light.cpp +++ b/software/app/excitation_light.cpp @@ -33,7 +33,7 @@ cExcitationLight::~cExcitationLight() //-------------------------------------setCurrent----------------------------------------------------------------------------- uint8_t cExcitationLight::SetCurrent(uint16_t microamp) { - uint16_t new_DACRectHigh = 0 + uint16_t new_DACRectHigh = 0; if(microamp < CURR_MAX_UAMP) { new_DACRectHigh = microamp/R_SENSE_DIV_FACT; @@ -47,7 +47,7 @@ uint8_t cExcitationLight::SetCurrent(uint16_t microamp) //-------------------------------------rectangleUpdate------------------------------------------------------------------------ uint8_t cExcitationLight::RectangleUpdate() { - m_rectangleStatus ? m_DAC->ChangeSettings(dac::eOpMode::NORMAL, 0) : m_DAC->ChangeSettings(dac::eOpMode::NORMAL, m_DAC_Rect_High); + m_rectangleStatus ? m_DAC->ChangeSettings(dac::eOpMode::NORMAL, 0) : m_DAC->ChangeSettings(dac::eOpMode::NORMAL, m_DACRectHigh); m_rectangleStatus ^= 0xFF; }