Galaxis Codebase  1.0.0
Team Galaxis software stack for the Carolo Cup 2023 - ROS2 based software
firmware_settings.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

struct __attribute__ ((packed, aligned(1)))
 
struct __attribute__ ((packed))
 

Variables

 ServoOffset_t
 
 FirmwareSetup_t
 
union {
   char   wrong_offset_motor_current_max [(offsetof(FirmwareSetup_t,
      motor_current_max)==0) ? 1 :-1]
 
   char   wrong_offset_erpm_max [(offsetof(FirmwareSetup_t,
      erpm_max)==4) ? 1 :-1]
 
   char   wrong_offset_max_brake_current [(offsetof(FirmwareSetup_t,
      max_brake_current)==4+4) ? 1 :-1]
 
   char   wrong_offset_max_servo_offset [(offsetof(FirmwareSetup_t,
      max_servo_offset)==12) ? 1 :-1]
 
   char   wrong_offset_manual_override_difference [(offsetof(FirmwareSetup_t,
      manual_override_difference)==12+4) ? 1 :-1]
 
   char   wrong_offset_use_rc_to_steer [(offsetof(FirmwareSetup_t,
      use_rc_to_steer)==12+4+2) ? 1 :-1]
 
   char   wrong_offset_rc_use_erpm [(offsetof(FirmwareSetup_t,
      rc_use_erpm)==12+4+2+1) ? 1 :-1]
 
   char   wrong_offset_servo_offset [(offsetof(FirmwareSetup_t,
      servo_offset)==12+4+2+1+1) ? 1 :-1]
 
   char   wrong_offset_motor_current_max_rc [(offsetof(FirmwareSetup_t,
      motor_current_max_rc)==12+4+2+1+1+4) ? 1 :-1]
 
   char   wrong_offset_erpm_max_rc [(offsetof(FirmwareSetup_t,
      erpm_max_rc)==12+4+2+1+1+4+4) ? 1 :-1]
 
   char   wrong_sizeof_packet [(sizeof(FirmwareSetup_t)==32) ? 1 :-1]
 
} FirmwareSetupTest
 

Function Documentation

◆ __attribute__() [1/2]

struct __attribute__ ( (packed)  )

Speed value for the motor

This variable usually would be used for system identification

The motor current in Ampere

Servo values are between [-100,100]

Stores the states for car lights and scenario settings

There are 2 bits for the following states The order is the following: Bits: [13,12|11,10|9,8|7,6|5,4|3,2|1,0] [scenario3,scenario2,scenario1,brakes,blinkerRight,blinkerLeft,headlight]

Enable/Disable Brakes (1 for enable, 0 for disable, otherwise undefined)

Definition at line 9 of file firmware_settings.h.

9  {
10  float motor_current_max; /* Ampere */
11 
12  float erpm_max;
13 
14  float max_brake_current; /* Ampere */
15 
16  ServoOffset_t max_servo_offset; /* shall be positive */
17 
18  uint16_t manual_override_difference;
19 
20  /* if true the car will take the RC steering values in autonomous mode */
21  uint8_t use_rc_to_steer;
22 
23  /* set erpm instead of motor current with RC */
24  uint8_t rc_use_erpm;
25 
26  /* can be negative, depends in which direction the wheels should steer in
27  * idle*/
28  ServoOffset_t servo_offset;
29 
30  float motor_current_max_rc;
31 
32  float erpm_max_rc;

References cuprules::modes::training::erpm_max_rc, cuprules::modes::training::rc_use_erpm, and ServoOffset_t.

◆ __attribute__() [2/2]

struct __attribute__ ( (packed, aligned(1))  )

Definition at line 4 of file firmware_settings.h.

4  {
5  int16_t front;
6  int16_t rear;

Variable Documentation

◆ FirmwareSetup_t

FirmwareSetup_t

Definition at line 33 of file firmware_settings.h.

Referenced by __attribute__().

◆ FirmwareSetupTest

union { ... } FirmwareSetupTest

◆ ServoOffset_t

ServoOffset_t

Definition at line 7 of file firmware_settings.h.

Referenced by __attribute__().

◆ wrong_offset_erpm_max

char wrong_offset_erpm_max[(offsetof(FirmwareSetup_t, erpm_max)==4) ? 1 :-1]

Definition at line 44 of file firmware_settings.h.

◆ wrong_offset_erpm_max_rc

char wrong_offset_erpm_max_rc[(offsetof(FirmwareSetup_t, erpm_max_rc)==12+4+2+1+1+4+4) ? 1 :-1]

Definition at line 60 of file firmware_settings.h.

◆ wrong_offset_manual_override_difference

char wrong_offset_manual_override_difference[(offsetof(FirmwareSetup_t, manual_override_difference)==12+4) ? 1 :-1]

Definition at line 50 of file firmware_settings.h.

◆ wrong_offset_max_brake_current

char wrong_offset_max_brake_current[(offsetof(FirmwareSetup_t, max_brake_current)==4+4) ? 1 :-1]

Definition at line 46 of file firmware_settings.h.

◆ wrong_offset_max_servo_offset

char wrong_offset_max_servo_offset[(offsetof(FirmwareSetup_t, max_servo_offset)==12) ? 1 :-1]

Definition at line 48 of file firmware_settings.h.

◆ wrong_offset_motor_current_max

char wrong_offset_motor_current_max[(offsetof(FirmwareSetup_t, motor_current_max)==0) ? 1 :-1]

Definition at line 42 of file firmware_settings.h.

◆ wrong_offset_motor_current_max_rc

char wrong_offset_motor_current_max_rc[(offsetof(FirmwareSetup_t, motor_current_max_rc)==12+4+2+1+1+4) ? 1 :-1]

Definition at line 58 of file firmware_settings.h.

◆ wrong_offset_rc_use_erpm

char wrong_offset_rc_use_erpm[(offsetof(FirmwareSetup_t, rc_use_erpm)==12+4+2+1) ? 1 :-1]

Definition at line 54 of file firmware_settings.h.

◆ wrong_offset_servo_offset

char wrong_offset_servo_offset[(offsetof(FirmwareSetup_t, servo_offset)==12+4+2+1+1) ? 1 :-1]

Definition at line 56 of file firmware_settings.h.

◆ wrong_offset_use_rc_to_steer

char wrong_offset_use_rc_to_steer[(offsetof(FirmwareSetup_t, use_rc_to_steer)==12+4+2) ? 1 :-1]

Definition at line 52 of file firmware_settings.h.

◆ wrong_sizeof_packet

char wrong_sizeof_packet[(sizeof(FirmwareSetup_t)==32) ? 1 :-1]

Definition at line 62 of file firmware_settings.h.

FirmwareSetup_t
FirmwareSetup_t
Definition: firmware_settings.h:33
cuprules::modes::training::erpm_max_rc
const float erpm_max_rc
Definition: cuprules.hpp:10
ServoOffset_t
ServoOffset_t
Definition: firmware_settings.h:7
cuprules::modes::training::rc_use_erpm
const uint8_t rc_use_erpm
Definition: cuprules.hpp:9