Skip to content

Commit

Permalink
10/12 rgb changes
Browse files Browse the repository at this point in the history
  • Loading branch information
emersonae committed Oct 12, 2023
1 parent eee2af5 commit f0efb7b
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 deletions.
4 changes: 2 additions & 2 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

#Select the default buil here.
[platformio]
default_envs = NUCLEO-F103RB-co2-rgb
default_envs = NUCLEO-F103RB

#RB: not all drivers will fit
[env:NUCLEO-F103RB]
Expand All @@ -25,7 +25,7 @@ default_envs = NUCLEO-F103RB-co2-rgb
-Os
-DPRODUCTION_FIRMWARE_BUILD
-DRRIV_ANALOG

-DRRIV_AHT
build_unflags = -O2
# -std=gnu++17
#build_unflags = -std=gnu++11
Expand Down
14 changes: 7 additions & 7 deletions src/datalogger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ void Datalogger::loadSensorConfigurations()
readSensorConfigurationFromEEPROM(i, &sensorConfigs[i]);

common_sensor_driver_config * commonConfiguration = (common_sensor_driver_config *) &sensorConfigs[i].common;

// notify("sensor type:");
notify(commonConfiguration->sensor_type);
if( sensorTypeCodeExists(commonConfiguration->sensor_type) )
{
Expand All @@ -363,7 +363,7 @@ void Datalogger::loadSensorConfigurations()
{
notify("no sensor config");
}
notify("FREE MEM");
// notify("FREE MEM");
printFreeMemory();

// construct the drivers
Expand All @@ -372,7 +372,7 @@ void Datalogger::loadSensorConfigurations()
int j = 0;
for (int i = 0; i < EEPROM_TOTAL_SENSOR_SLOTS; i++)
{
notify("FREE MEM");
// notify("FREE MEM");
printFreeMemory();
common_sensor_driver_config * commonConfiguration = (common_sensor_driver_config *) &sensorConfigs[i].common;

Expand All @@ -382,7 +382,7 @@ void Datalogger::loadSensorConfigurations()
continue;
}

debug("getting driver for sensor type");
// debug("getting driver for sensor type");
debug(commonConfiguration->sensor_type);
SensorDriver *driver = driverForSensorTypeCode(commonConfiguration->sensor_type);
debug("got sensor driver");
Expand All @@ -395,14 +395,14 @@ void Datalogger::loadSensorConfigurations()
{
debug("got i2c sensor");
((I2CProtocolSensorDriver *)driver)->setWire(&WireTwo);
debug("set wire");
// debug("set wire");
}
debug("do setup");
driver->setup();

debug("configure sensor driver");
// debug("configure sensor driver");
driver->configureFromBytes(sensorConfigs[i]); //pass configuration struct to the driver
debug("configured sensor driver");
// debug("configured sensor driver");
}

}
Expand Down
2 changes: 1 addition & 1 deletion src/sensors/drivers/adafruit_ahtx0.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ void AdaAHTX0::setup()
// notify("aht setup");
aht = new Adafruit_AHTX0();
if(!aht->begin(wire,1,AHTX0_I2CADDR_DEFAULT)){
// notify("aht setup fail");
notify("aht setup fail");
}
}

Expand Down
1 change: 1 addition & 0 deletions src/sensors/sensor_map.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ std::map<std::string, short> sensorTypeCodeMap;

bool sensorTypeCodeExists(short type)
{
// notify("sc exist?");
return sensorTypeMap.count(type) > 0;
}

Expand Down

0 comments on commit f0efb7b

Please sign in to comment.