PX4 Firmware
PX4 Autopilot Software http://px4.io
tfmini_parser.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Enumerations

enum  TFMINI_PARSE_STATE {
  TFMINI_PARSE_STATE::STATE0_UNSYNC = 0, TFMINI_PARSE_STATE::STATE1_SYNC_1, TFMINI_PARSE_STATE::STATE1_SYNC_2, TFMINI_PARSE_STATE::STATE2_GOT_DIST_L,
  TFMINI_PARSE_STATE::STATE2_GOT_DIST_H, TFMINI_PARSE_STATE::STATE3_GOT_STRENGTH_L, TFMINI_PARSE_STATE::STATE3_GOT_STRENGTH_H, TFMINI_PARSE_STATE::STATE4_GOT_RESERVED,
  TFMINI_PARSE_STATE::STATE5_GOT_QUALITY, TFMINI_PARSE_STATE::STATE6_GOT_CHECKSUM
}
 

Functions

int tfmini_parse (char c, char *parserbuf, unsigned *parserbuf_index, TFMINI_PARSE_STATE *state, float *dist)
 

Enumeration Type Documentation

◆ TFMINI_PARSE_STATE

enum TFMINI_PARSE_STATE
strong
Enumerator
STATE0_UNSYNC 
STATE1_SYNC_1 
STATE1_SYNC_2 
STATE2_GOT_DIST_L 
STATE2_GOT_DIST_H 
STATE3_GOT_STRENGTH_L 
STATE3_GOT_STRENGTH_H 
STATE4_GOT_RESERVED 
STATE5_GOT_QUALITY 
STATE6_GOT_CHECKSUM 

Definition at line 59 of file tfmini_parser.h.

Function Documentation

◆ tfmini_parse()

int tfmini_parse ( char  c,
char *  parserbuf,
unsigned *  parserbuf_index,
TFMINI_PARSE_STATE state,
float *  dist 
)

Definition at line 66 of file tfmini_parser.cpp.

References parser_state, STATE0_UNSYNC, STATE1_SYNC_1, STATE1_SYNC_2, STATE2_GOT_DIST_H, STATE2_GOT_DIST_L, STATE3_GOT_STRENGTH_H, STATE3_GOT_STRENGTH_L, STATE4_GOT_RESERVED, STATE5_GOT_QUALITY, STATE6_GOT_CHECKSUM, t1, and t2.

Referenced by TFMINI::collect().

Here is the caller graph for this function: