comparison Discovery/Src/settings.c @ 733:7b0e020513e3

Optical sensor as default: The optical sensor is now set as default configuration ensuring that the external interface is switched off per default. Otherwise power would be consumed e.g. by the ADC even no sensors are connectet because OSTC is used for OC dives only.
author Ideenmodellierer
date Sun, 15 Jan 2023 21:48:34 +0100
parents 5143e927219f
children 5078da3845c0
comparison
equal deleted inserted replaced
732:e33d661d1743 733:7b0e020513e3
323 .amPMTime = 0, 323 .amPMTime = 0,
324 .autoSetpoint = 0, 324 .autoSetpoint = 0,
325 .scrubTimerMax_Obsolete = 0, 325 .scrubTimerMax_Obsolete = 0,
326 .scrubTimerCur_Obsolete = 0, 326 .scrubTimerCur_Obsolete = 0,
327 .scrubTimerMode = SCRUB_TIMER_OFF, 327 .scrubTimerMode = SCRUB_TIMER_OFF,
328 .ext_sensor_map[0] = SENSOR_ANALOG, 328 .ext_sensor_map[0] = SENSOR_OPTIC,
329 .ext_sensor_map[1] = SENSOR_ANALOG, 329 .ext_sensor_map[1] = SENSOR_OPTIC,
330 .ext_sensor_map[2] = SENSOR_ANALOG, 330 .ext_sensor_map[2] = SENSOR_OPTIC,
331 .ext_sensor_map[3] = SENSOR_NONE, 331 .ext_sensor_map[3] = SENSOR_NONE,
332 .ext_sensor_map[4] = SENSOR_NONE, 332 .ext_sensor_map[4] = SENSOR_NONE,
333 }; 333 };
334 334
335 /* Private function prototypes -----------------------------------------------*/ 335 /* Private function prototypes -----------------------------------------------*/
521 pSettings->scrubberData[1].lastDive.WeekDay = 0; 521 pSettings->scrubberData[1].lastDive.WeekDay = 0;
522 pSettings->scrubberData[1].lastDive.Month = 0; 522 pSettings->scrubberData[1].lastDive.Month = 0;
523 pSettings->scrubberData[1].lastDive.Date = 0; 523 pSettings->scrubberData[1].lastDive.Date = 0;
524 pSettings->scrubberData[1].lastDive.Year = 0; 524 pSettings->scrubberData[1].lastDive.Year = 0;
525 // no break; 525 // no break;
526 case 0xFFFF0023: pSettings->ext_sensor_map[0] = SENSOR_ANALOG; 526 case 0xFFFF0023: pSettings->ext_sensor_map[0] = SENSOR_OPTIC;
527 pSettings->ext_sensor_map[1] = SENSOR_ANALOG; 527 pSettings->ext_sensor_map[1] = SENSOR_OPTIC;
528 pSettings->ext_sensor_map[2] = SENSOR_ANALOG; 528 pSettings->ext_sensor_map[2] = SENSOR_OPTIC;
529 pSettings->ext_sensor_map[3] = SENSOR_NONE; 529 pSettings->ext_sensor_map[3] = SENSOR_NONE;
530 pSettings->ext_sensor_map[4] = SENSOR_NONE; 530 pSettings->ext_sensor_map[4] = SENSOR_NONE;
531 // no break; 531 // no break;
532 default: 532 default:
533 pSettings->header = pStandard->header; 533 pSettings->header = pStandard->header;
1537 || (Settings.ext_sensor_map[1] >= SENSOR_END) 1537 || (Settings.ext_sensor_map[1] >= SENSOR_END)
1538 || (Settings.ext_sensor_map[2] >= SENSOR_END) 1538 || (Settings.ext_sensor_map[2] >= SENSOR_END)
1539 || (Settings.ext_sensor_map[3] >= SENSOR_END) 1539 || (Settings.ext_sensor_map[3] >= SENSOR_END)
1540 || (Settings.ext_sensor_map[4] >= SENSOR_END)) 1540 || (Settings.ext_sensor_map[4] >= SENSOR_END))
1541 { 1541 {
1542 Settings.ext_sensor_map[0] = SENSOR_ANALOG; 1542 Settings.ext_sensor_map[0] = SENSOR_OPTIC;
1543 Settings.ext_sensor_map[1] = SENSOR_ANALOG; 1543 Settings.ext_sensor_map[1] = SENSOR_OPTIC;
1544 Settings.ext_sensor_map[2] = SENSOR_ANALOG; 1544 Settings.ext_sensor_map[2] = SENSOR_OPTIC;
1545 Settings.ext_sensor_map[3] = SENSOR_NONE; 1545 Settings.ext_sensor_map[3] = SENSOR_NONE;
1546 Settings.ext_sensor_map[4] = SENSOR_NONE; 1546 Settings.ext_sensor_map[4] = SENSOR_NONE;
1547 corrections++; 1547 corrections++;
1548 } 1548 }
1549 1549