[gps] Added 1pps time message

main-solar-only
Richard Meadows 2015-11-16 12:34:48 +00:00
rodzic 376a4f0516
commit 62bfcdda3c
2 zmienionych plików z 34 dodań i 0 usunięć

Wyświetl plik

@ -461,6 +461,34 @@ enum osp_oktosend {
} __PACKED__ payload;
};
/**
* 6.42 OSP 1PPS Time
*/
#define OSP_OUT_1PPS_TIME_ID 52
struct osp_out_1pps_time {
osp_message_id_t id;
enum osp_packet_state state;
uint16_t max_payload_size;
struct {
uint8_t hour;
uint8_t minute;
uint8_t second;
uint8_t day;
uint8_t month;
uint16_t year;
int16_t utc_offset_int; /* s. gps offset from utc */
uint32_t utc_offset_frac; /* ns */
uint8_t status; /* enum osp_1pps_status */
} __PACKED__ payload;
};
enum osp_1pps_status {
OSP_1PPS_VALID = (1<<0),
OSP_1PPS_IS_UTCTIME = (1<<1), /* otherwise gps time */
OSP_1PPS_OFFSET_VALID = (1<<2),
};
/**
* 6.55 OSP GPIO State
*/

Wyświetl plik

@ -95,6 +95,11 @@ volatile struct osp_out_geodetic_navigation_data osp_out_geodetic_navigation_dat
.state = OSP_PACKET_WAITING,
.max_payload_size = sizeof(osp_out_geodetic_navigation_data.payload)
};
volatile struct osp_out_1pps_time osp_out_1pps_time = {
.id = OSP_OUT_1PPS_TIME_ID,
.state = OSP_PACKET_WAITING,
.max_payload_size = sizeof(osp_out_1pps_time.payload)
};
volatile struct osp_out_gpio_state osp_out_gpio_state = {
.id = OSP_OUT_GPIO_STATE_ID,
.state = OSP_PACKET_WAITING,
@ -125,6 +130,7 @@ volatile osp_message_t* const osp_out_messages[] = {
(osp_message_t*)&osp_out_ephemeris_data,
(osp_message_t*)&osp_out_oktosend,
(osp_message_t*)&osp_out_geodetic_navigation_data,
(osp_message_t*)&osp_out_1pps_time,
(osp_message_t*)&osp_out_gpio_state,
(osp_message_t*)&osp_out_hw_config_req,
(osp_message_t*)&osp_out_aiding_request,