Format, some docs
This commit is contained in:
parent
1d3469e840
commit
aef5bf4797
|
|
@ -277,6 +277,7 @@ static int mk_cam(uint8_t *cam_oer, uint32_t *cam_len) {
|
||||||
|
|
||||||
ph->list.array[i]->pathDeltaTime = calloc(1,sizeof(PathDeltaTime_t));
|
ph->list.array[i]->pathDeltaTime = calloc(1,sizeof(PathDeltaTime_t));
|
||||||
*ph->list.array[i]->pathDeltaTime = (lightship->pos_history[i]->ts - lightship->pos_history[i+1]->ts)/10;
|
*ph->list.array[i]->pathDeltaTime = (lightship->pos_history[i]->ts - lightship->pos_history[i+1]->ts)/10;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
lightship->last_cam_lfc = now;
|
lightship->last_cam_lfc = now;
|
||||||
|
|
@ -364,9 +365,7 @@ int lightship_init() {
|
||||||
if (shm_fd == -1) {
|
if (shm_fd == -1) {
|
||||||
log_debug("obd shmem not found\n");
|
log_debug("obd shmem not found\n");
|
||||||
lightship->use_obd = 0;
|
lightship->use_obd = 0;
|
||||||
}
|
} else {
|
||||||
|
|
||||||
else{
|
|
||||||
log_debug("obd shmem found\n");
|
log_debug("obd shmem found\n");
|
||||||
lightship->use_obd = 1;
|
lightship->use_obd = 1;
|
||||||
close(shm_fd);
|
close(shm_fd);
|
||||||
|
|
|
||||||
27
src/cam.h
27
src/cam.h
|
|
@ -86,12 +86,39 @@ typedef struct lightship {
|
||||||
|
|
||||||
} lightship_t;
|
} lightship_t;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @brief Initializes the main CA struct (lightship)
|
||||||
|
*
|
||||||
|
* @return Always zero
|
||||||
|
*/
|
||||||
int lightship_init();
|
int lightship_init();
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @brief Checks if a CAM must be sent
|
||||||
|
*
|
||||||
|
* @return True if CAM must be sent, false otherwise
|
||||||
|
*/
|
||||||
int lightship_check();
|
int lightship_check();
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @brief Resets the CAM sending timer
|
||||||
|
*
|
||||||
|
* @return Nothing
|
||||||
|
*/
|
||||||
void lightship_reset_timer();
|
void lightship_reset_timer();
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @brief Analyzes a received CAM
|
||||||
|
*
|
||||||
|
* @return A CAM check code
|
||||||
|
*/
|
||||||
enum CAM_CHECK_R check_cam(BTPPacketIndication_t* bpi, CAM_t* cam,uint8_t* ssp, uint32_t ssp_len);
|
enum CAM_CHECK_R check_cam(BTPPacketIndication_t* bpi, CAM_t* cam,uint8_t* ssp, uint32_t ssp_len);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @brief Main CA service
|
||||||
|
*
|
||||||
|
* @return NULL
|
||||||
|
*/
|
||||||
void* ca_service();
|
void* ca_service();
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue