pico-tracker/firmware/test/tc/location_aprs.h

33 wiersze
868 B
C

#ifndef __verification__
#define __verification__
#endif
2015-06-07 21:22:24 +00:00
/****************************//* location_aprs_tc *//****************************/
/* Checks the location is returning the right things etc. etc */
2015-06-07 21:22:24 +00:00
#include "location.h"
/* Parameters in */
struct location_aprs_tc_params {
2015-06-07 21:22:24 +00:00
float lat;
float lon;
} location_aprs_tc_params;
/* Results out */
struct location_aprs_tc_results {
2015-06-07 21:22:24 +00:00
bool tx_allow;
float frequency;
} location_aprs_tc_results;
/* Function */
__verification__ void location_aprs_tc(void) {
/* Supply co-ords in units of 100 nanodeg */
aprs_location_update(
(int32_t)(location_aprs_tc_params.lon * 10 * 1000 * 1000),
(int32_t)(location_aprs_tc_params.lat * 10 * 1000 * 1000)
);
2015-06-07 21:22:24 +00:00
location_aprs_tc_results.tx_allow = aprs_location_tx_allow();
location_aprs_tc_results.frequency = aprs_location_frequency();
}