sensor init
This commit is contained in:
1 parent
1a24689652
commit
12ad60a0a8
5 files changed
+18
-4
No files matched your search
@@ -317,9 +317,9 @@ void loadConfig() {
|
||||
|
||||
if (nvs_get_i8(my_handle, "payloadmask", &flash8) == ESP_OK) {
|
||||
cfg.payloadmask = flash8;
|
||||
ESP_LOGI(TAG, "GPS mode = %d", flash8);
|
||||
ESP_LOGI(TAG, "payloadmask = %u", flash8);
|
||||
} else {
|
||||
ESP_LOGI(TAG, "GPS mode set to default %d", cfg.payloadmask);
|
||||
ESP_LOGI(TAG, "payloadmask set to default %u", cfg.payloadmask);
|
||||
saveConfig();
|
||||
}
|
||||
|
||||
|
||||
+7
-1
@@ -158,12 +158,18 @@ void setup() {
|
||||
strcat_P(features, " GPS");
|
||||
#endif
|
||||
|
||||
// initialize gps
|
||||
// initialize bme
|
||||
#ifdef HAS_BME
|
||||
strcat_P(features, " BME");
|
||||
bme_init();
|
||||
#endif
|
||||
|
||||
// initialize sensors
|
||||
#ifdef HAS_SENSORS
|
||||
strcat_P(features, " SENS");
|
||||
sensor_init();
|
||||
#endif
|
||||
|
||||
// initialize LoRa
|
||||
#ifdef HAS_LORA
|
||||
strcat_P(features, " LORA");
|
||||
|
||||
@@ -4,6 +4,13 @@
|
||||
// Local logging tag
|
||||
static const char TAG[] = "main";
|
||||
|
||||
void sensor_init(void) {
|
||||
|
||||
// this function is called dureing device startup
|
||||
// put your sensor initialization routines here
|
||||
|
||||
}
|
||||
|
||||
uint8_t sensor_mask(uint8_t sensor_no) {
|
||||
switch (sensor_no) {
|
||||
case 1:
|
||||
|
||||
Reference in new issue
Block a user