view Small_CPU/Inc/uartProtocol_GNSS.h @ 926:875933272056 Evo_2_23 tip

Bugfix sensor de-/activation handling: In the previous version a CO2 sensor could cause a not used analog channel to be displayed. Rootcause was that all sensor type, not only o2 sensors, were used for o2 sensor deactivation evaluation. The deactivation state is the criteria if a value is displayed or not. In the new version only o2 sensor type are used for handling of sensor de-/activation state. In addition the cursor will now be set to the first valid sensor entry in case sensor slot 0 is empty.
author Ideenmodellierer
date Thu, 14 Nov 2024 20:13:18 +0100
parents c0553dd70608
children
line wrap: on
line source

/**
  ******************************************************************************
  * @file    uartProtocol_GNSS.h
  * @author  heinrichs weikamp gmbh
  * @version V0.0.1
  * @date    30-Sep-2024
  * @brief	 Interface functionality for operation of gnss devices
  *
  @verbatim
  ==============================================================================
                        ##### How to use #####
  ==============================================================================
  @endverbatim
  ******************************************************************************
  * @attention
  *
  * <h2><center>&copy; COPYRIGHT(c) 2014 heinrichs weikamp</center></h2>
  *
  ******************************************************************************
  */

/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef UART_PROTOCOL_GNSS_H
#define UART_PROTOCOL_GNSS_H

#ifdef __cplusplus
 extern "C" {
#endif

/* Includes ------------------------------------------------------------------*/
#include "configuration.h"
#include "stm32f4xx_hal.h"

 typedef enum
  {
		UART_GNSS_INIT = 0,		/* Default Status for every sensor type */
		UART_GNSS_IDLE,			/* sensor detected and no communication pending */
		UART_GNSS_ERROR,		/* Error message received from sensor */
		UART_GNSS_WARMUP = 10,
		UART_GNSS_LOADCONF_0,
		UART_GNSS_LOADCONF_1,
		UART_GNSS_LOADCONF_2,
		UART_GNSS_GET_PVT,
  } uartGnssStatus_t;

  typedef enum
  {
  	GNSSRX_READY = 0,			/* Initial state */
	GNSSRX_DETECT_HEADER_0,
	GNSSRX_DETECT_HEADER_1,
	GNSSRX_DETECT_HEADER_2,
	GNSSRX_DETECT_HEADER_3,
	GNSSRX_DETECT_ACK_0,
	GNSSRX_DETECT_ACK_1,
	GNSSRX_DETECT_ACK_2,
	GNSSRX_DETECT_ACK_3,
	GNSSRX_READ_NAV_DATA,
	GNSSRX_READ_PVT_DATA,
	GNSSRX_READ_POSLLH_DATA
  } receiveStateGnss_t;


  typedef enum
  {
  	GNSSCMD_LOADCONF_0 = 0,
	GNSSCMD_LOADCONF_1,
	GNSSCMD_LOADCONF_2,
	GNSSCMD_GET_NAV_DATA,
	GNSSCMD_GET_PVT_DATA,
	GNSSCMD_GET_POSLLH_DATA
  } gnssSensorCmd_t;


void uartGnss_Control(void);
void uartGnss_ProcessData(uint8_t data);
uint8_t uartGnss_isSensorConnected();
void uartGnss_SendCmd(uint8_t GnssCmd);

#endif /* UART_PROTOCOL_GNSS_H */