Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions protocol.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@
typedef enum {
E_NETWORK_PACKET_CONTROLLER,
E_NETWORK_PACKET_IN_REPORT,
E_NETWORK_PACKET_EXIT,
E_NETWORK_PACKET_SETCONFIG,
E_NETWORK_PACKET_GETCONFIG,
E_NETWORK_PACKET_SAVECALIBRATION,
} e_network_packet_type;

typedef struct PACKED
Expand All @@ -36,4 +40,19 @@ typedef struct PACKED
uint8_t controller_type;
} s_network_packet_controller;

/**
* When adding new attributes to this struct, add it to the end.
*/
typedef struct PACKED
{
uint8_t packet_type;
float sensibility;
int16_t dead_zone_x;
int16_t dead_zone_y;
float yx_ratio;
float exponent_x;
float exponent_y;

}s_network_packet_config;

#endif /* GIMX_NETWORK_PROTOCOL_H_ */