fixed some bugs
This commit is contained in:
+2
-2
@@ -11,7 +11,7 @@ set(SOURCE_FILES
|
||||
gex/gex_client.h
|
||||
gex/gex_helpers.c
|
||||
gex/gex_helpers.h
|
||||
gex/gex_client_internal.h
|
||||
gex/gex_internal.h
|
||||
gex/gex_message_types.h
|
||||
gex/utils/hexdump.c
|
||||
gex/utils/hexdump.h
|
||||
@@ -24,7 +24,7 @@ set(SOURCE_FILES
|
||||
gex/protocol/TinyFrame.c
|
||||
gex/protocol/TinyFrame.h
|
||||
gex/utils/type_coerce.h
|
||||
)
|
||||
gex/gex_defines.h)
|
||||
|
||||
include_directories(
|
||||
gex
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
#include "TinyFrame.h"
|
||||
#include "gex_client.h"
|
||||
#include <unistd.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include "gex_client_internal.h"
|
||||
#include "TinyFrame.h"
|
||||
#include "gex_internal.h"
|
||||
|
||||
void TF_WriteImpl(TinyFrame *tf, const uint8_t *buff, size_t len)
|
||||
{
|
||||
|
||||
+1
-1
@@ -12,7 +12,7 @@
|
||||
|
||||
#include "gex_client.h"
|
||||
#include "serial.h"
|
||||
#include "gex_client_internal.h"
|
||||
#include "gex_internal.h"
|
||||
#include "gex_message_types.h"
|
||||
#include "gex_helpers.h"
|
||||
#include "utils/payload_parser.h"
|
||||
|
||||
+1
-5
@@ -9,11 +9,7 @@
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include "TinyFrame.h"
|
||||
|
||||
typedef struct gex_client_ GexClient;
|
||||
|
||||
/** Callback for spontaneous reports from units */
|
||||
typedef void (*GEX_ReportListener)(GexClient *gex, const char *unit, uint8_t code, const uint8_t *payload, uint32_t len);
|
||||
#include "gex_defines.h"
|
||||
|
||||
/**
|
||||
* Bind a report listener
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// Created by MightyPork on 2017/12/19.
|
||||
//
|
||||
|
||||
#ifndef GEX_CLIENT_GEX_DEFINES_H
|
||||
#define GEX_CLIENT_GEX_DEFINES_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
typedef struct gex_client_ GexClient;
|
||||
|
||||
/** Callback for spontaneous reports from units */
|
||||
typedef void (*GEX_ReportListener)(GexClient *gex, const char *unit, uint8_t code, const uint8_t *payload, uint32_t len);
|
||||
|
||||
#endif //GEX_CLIENT_GEX_DEFINES_H
|
||||
+3
-1
@@ -2,8 +2,10 @@
|
||||
// Created by MightyPork on 2017/12/19.
|
||||
//
|
||||
|
||||
#include <malloc.h>
|
||||
|
||||
#include "gex_defines.h"
|
||||
#include "gex_helpers.h"
|
||||
#include "gex_client_internal.h"
|
||||
|
||||
/** Delete recursively all GEX callsign look-up table entries */
|
||||
void destroy_unit_lookup(GexClient *gex)
|
||||
|
||||
+2
-2
@@ -5,8 +5,8 @@
|
||||
#ifndef GEX_CLIENT_GEX_HELPERS_H
|
||||
#define GEX_CLIENT_GEX_HELPERS_H
|
||||
|
||||
#include "gex_client_internal.h"
|
||||
#include "gex_client.h"
|
||||
#include "gex_internal.h"
|
||||
#include "gex_defines.h"
|
||||
|
||||
/** Delete recursively all GEX callsign look-up table entries */
|
||||
void destroy_unit_lookup(GexClient *gex);
|
||||
|
||||
@@ -5,6 +5,10 @@
|
||||
#ifndef GEX_CLIENT_GEX_CLIENT_INTERNAL_H
|
||||
#define GEX_CLIENT_GEX_CLIENT_INTERNAL_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include "gex_client.h"
|
||||
|
||||
struct gex_unit_lu {
|
||||
char *name; //!< Unit name
|
||||
char *type; //!< Unit type
|
||||
Reference in New Issue
Block a user