kopia lustrzana https://github.com/DL7AD/pecanpico10
Minor comment changes.
rodzic
e0a40674a8
commit
fb0be5e249
|
@ -331,12 +331,12 @@ THD_FUNCTION(collectorThread, arg) {
|
|||
TRACE_TAB, time.year, time.month, time.day, time.hour,
|
||||
time.minute, time.day,
|
||||
TRACE_TAB, lastDataPoint->gps_lat/10000000,
|
||||
(lastDataPoint->gps_lat > 0
|
||||
? 1:-1)*lastDataPoint->gps_lat%10000000,
|
||||
TRACE_TAB, lastDataPoint->gps_lon/10000000,
|
||||
(lastDataPoint->gps_lon > 0
|
||||
? 1:-1)*lastDataPoint->gps_lon%10000000,
|
||||
TRACE_TAB, lastDataPoint->gps_alt
|
||||
(lastDataPoint->gps_lat > 0
|
||||
? 1:-1)*lastDataPoint->gps_lat%10000000,
|
||||
TRACE_TAB, lastDataPoint->gps_lon/10000000,
|
||||
(lastDataPoint->gps_lon > 0
|
||||
? 1:-1)*lastDataPoint->gps_lon%10000000,
|
||||
TRACE_TAB, lastDataPoint->gps_alt
|
||||
);
|
||||
lastDataPoint->gps_state = GPS_LOG; // Mark dataPoint as LOG packet
|
||||
} else {
|
||||
|
|
|
@ -118,8 +118,24 @@ void init_data_collector(void);
|
|||
*
|
||||
* @api
|
||||
*/
|
||||
#define hasGPSacquiredLock(tp) (tp->gps_state == GPS_LOCKED1 \
|
||||
|| tp->gps_state == GPS_LOCKED2)
|
||||
#define hasGPSacquiredLock(dp) (dp->gps_state == GPS_LOCKED1 \
|
||||
|| dp->gps_state == GPS_LOCKED2)
|
||||
|
||||
/**
|
||||
* @brief Is position valid.
|
||||
*
|
||||
* @param[in] pointer to data point
|
||||
*
|
||||
* @returns result of check
|
||||
* @retval true if position data is valid
|
||||
* @retval false if position not valid
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
#define isPositionValid(dp) (dp->gps_state == GPS_LOCKED1 \
|
||||
|| dp->gps_state == GPS_LOCKED2 \
|
||||
|| dp->gps_state == GPS_FIXED \
|
||||
|| dp->gps_state == GPS_LOG)
|
||||
|
||||
#endif /* __COLLECTOR_H__ */
|
||||
|
||||
|
|
|
@ -74,10 +74,7 @@ THD_FUNCTION(bcnThread, arg) {
|
|||
last_conf_transmission += conf->digi.tel_enc_cycle;
|
||||
}
|
||||
|
||||
while(!(dataPoint->gps_state == GPS_FIXED
|
||||
|| dataPoint->gps_state == GPS_LOCKED1
|
||||
|| dataPoint->gps_state == GPS_LOCKED2
|
||||
|| dataPoint->gps_state == GPS_LOG)) {
|
||||
while(!isPositionValid(dataPoint)) {
|
||||
TRACE_INFO("BCN > Waiting for position data for beacon");
|
||||
chThdSleep(TIME_S2I(60));
|
||||
continue;
|
||||
|
@ -106,10 +103,11 @@ THD_FUNCTION(bcnThread, arg) {
|
|||
chThdSleep(TIME_S2I(5));
|
||||
}
|
||||
|
||||
TRACE_INFO("BCN > Transmit recently heard direct");
|
||||
/*
|
||||
* Encode/Transmit APRSD packet.
|
||||
* This is a tracker originated message (not a reply to a request).
|
||||
* The message will be sent to the base station if set.
|
||||
* The message will be addressed to the base station if set.
|
||||
* Else send it to device identity.
|
||||
*/
|
||||
char *call = conf_sram.aprs.base.enabled
|
||||
|
|
Ładowanie…
Reference in New Issue