Skip to content

Commit a40bbe3

Browse files
committed
Merge branch 'loraharvest_integration' of github.com:NUKnightLab/SensorGrid into loraharvest_integration
2 parents 948fbd1 + ae8cfbc commit a40bbe3

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

SensorGridPM/config.cpp

+7-3
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,10 @@ bool RadioConfig::loadConfig() {
5353
getConfig("RFM95_INT", DEFAULT_RFM95_INT)));
5454
return true;
5555
} else {
56+
SD_CHIP_SELECT_PIN = (uint32_t)(atoi(DEFAULT_SD_CHIP_SELECT_PIN));
57+
RFM95_CS = (uint32_t)(atoi(DEFAULT_RFM95_CS));
58+
RFM95_RST = (uint32_t)(atoi(DEFAULT_RFM95_RST));
59+
RFM95_INT = (uint32_t)(atoi(DEFAULT_RFM95_INT));
5660
logln(F("ERROR: No config file found"));
5761
return false;
5862
}
@@ -83,10 +87,10 @@ bool Config::loadConfig() {
8387
getConfig("SAMPLE_PERIOD", DEFAULT_SAMPLE_PERIOD)));
8488
collection_period = (uint32_t)(atoi(
8589
getConfig("COLLECTION_PERIOD", DEFAULT_COLLECTION_PERIOD)));
86-
Serial.print("Loading LoRa config ..");
87-
RadioConfig::loadConfig();
88-
Serial.println(".. done");
8990
}
91+
Serial.print("Loading LoRa config ..");
92+
RadioConfig::loadConfig();
93+
Serial.println(".. done");
9094
if (node_id == 0) {
9195
Serial.println("Node ID not configured. Using Lower byte of Si7021 serial number A.");
9296
Adafruit_Si7021 _sensor = Adafruit_Si7021();

0 commit comments

Comments
 (0)