/* * Master Firmware: Sensor Data * * This file is part of OpenTrack. * * OpenTrack is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * OpenTrack is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with OpenTrack. If not, see . * * Ethan Zonca * Matthew Kanning * Kyle Ripperger * Matthew Kroening * */ #include "../config.h" #include #include #include #include "sensordata.h" #include "slavesensors.h" #include "sensors.h" #include "looptime.h" #include "gps.h" #include "logger.h" // Slave sensor reading storage int32_t slaves[MAX_NUM_SLAVES][MAX_NUM_SENSORS]; void sensordata_setup() { for(int i=0; i sysconfig->buzzer_failsafe_duration) { isTouchdown = true; } else { int32_t altitude = sensordata_getSensorValue(SENSOR_ALTITUDE); if(altitude != -2111111111 && altitude < sysconfig->buzzer_trigger_maxaltitude && time_millis() > sysconfig->buzzer_trigger_minduration) { isTouchdown = true; } } }