2019-03-04 14:13:01 -04:00
|
|
|
/*
|
|
|
|
This program is free software: you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
This program 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 General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
|
|
|
|
|
|
|
Author: Francisco Ferreira
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <AP_HAL/AP_HAL.h>
|
|
|
|
|
2021-07-24 07:22:19 -03:00
|
|
|
#ifndef HAL_NMEA_OUTPUT_ENABLED
|
|
|
|
#define HAL_NMEA_OUTPUT_ENABLED !HAL_MINIMIZE_FEATURES
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if HAL_NMEA_OUTPUT_ENABLED
|
2019-03-04 14:13:01 -04:00
|
|
|
|
|
|
|
#include <AP_SerialManager/AP_SerialManager.h>
|
|
|
|
|
|
|
|
class AP_NMEA_Output {
|
|
|
|
|
|
|
|
public:
|
|
|
|
static AP_NMEA_Output* probe();
|
|
|
|
|
|
|
|
/* Do not allow copies */
|
2021-07-24 07:22:19 -03:00
|
|
|
CLASS_NO_COPY(AP_NMEA_Output);
|
2019-03-04 14:13:01 -04:00
|
|
|
|
|
|
|
void update();
|
|
|
|
|
|
|
|
private:
|
|
|
|
AP_NMEA_Output();
|
|
|
|
|
|
|
|
uint8_t _nmea_checksum(const char *str);
|
|
|
|
|
|
|
|
uint8_t _num_outputs;
|
|
|
|
AP_HAL::UARTDriver* _uart[SERIALMANAGER_NUM_PORTS];
|
|
|
|
|
2019-11-28 20:46:02 -04:00
|
|
|
uint32_t _last_run_ms;
|
2019-03-04 14:13:01 -04:00
|
|
|
};
|
|
|
|
|
2021-07-20 09:16:21 -03:00
|
|
|
#endif // !HAL_MINIMIZE_FEATURES
|