SAE Teensy ECU
IIT SAE Microcontroller programming
Loading...
Searching...
No Matches
SerialCommand.def File Reference

SerialCommand config. More...

#include "PPHelp.h"

Go to the source code of this file.

Macros

#define COMMAND_ENABLE_CHARGING   123
 Command used to enable charging.
 
#define COMMAND_SEND_CANBUS_MESSAGE   111
 Command used to listen for a canbus message to send.
 
#define COMMAND_TOGGLE_CANBUS_SNIFF   127
 Command used to enable the ASCII canbus sniffer.
 
#define COMMAND_TOGGLE_MIRROR_MODE   90
 Command to enable mirror mode, for Mirror.h.
 
#define COMMAND_ENTER_MIRROR_SET   255
 Command to listen for a pin to set, for Mirror.h.
 
#define COMMAND_SEND_ECHO   84
 Command to listen for a can message to echo, for Echo.h.
 
#define COMMAND_TOGGLE_REVERSE   25
 Command to enable reverse motors, for MotorControl.h.
 
#define COMMAND_PRINT_LOOKUP   101
 Command to send the compressed lookup table over serial.
 
#define COMMAND_UPDATE_SERIALVAR   61
 Command to update a serial variable.
 
#define SERIAL_COMMANDS
 Defines commands that the ECU must react to.
 

Detailed Description

SerialCommand config.

Author
IR
Version
0.1
Date
2021-03-16

This config file denotes unique byte codes to represent commands on each ECU.

Warning
Command numbers must be, at a minimum, be defined within the SERIAL_COMMANDS X macro, else they will not be checked for.

Definition in file SerialCommand.def.

Macro Definition Documentation

◆ COMMAND_ENABLE_CHARGING

#define COMMAND_ENABLE_CHARGING   123

Command used to enable charging.

Definition at line 26 of file SerialCommand.def.

◆ COMMAND_ENTER_MIRROR_SET

#define COMMAND_ENTER_MIRROR_SET   255

Command to listen for a pin to set, for Mirror.h.

Definition at line 42 of file SerialCommand.def.

◆ COMMAND_PRINT_LOOKUP

#define COMMAND_PRINT_LOOKUP   101

Command to send the compressed lookup table over serial.

Definition at line 54 of file SerialCommand.def.

◆ COMMAND_SEND_CANBUS_MESSAGE

#define COMMAND_SEND_CANBUS_MESSAGE   111

Command used to listen for a canbus message to send.

Definition at line 30 of file SerialCommand.def.

◆ COMMAND_SEND_ECHO

#define COMMAND_SEND_ECHO   84

Command to listen for a can message to echo, for Echo.h.

Definition at line 46 of file SerialCommand.def.

◆ COMMAND_TOGGLE_CANBUS_SNIFF

#define COMMAND_TOGGLE_CANBUS_SNIFF   127

Command used to enable the ASCII canbus sniffer.

Definition at line 34 of file SerialCommand.def.

◆ COMMAND_TOGGLE_MIRROR_MODE

#define COMMAND_TOGGLE_MIRROR_MODE   90

Command to enable mirror mode, for Mirror.h.

Definition at line 38 of file SerialCommand.def.

◆ COMMAND_TOGGLE_REVERSE

#define COMMAND_TOGGLE_REVERSE   25

Command to enable reverse motors, for MotorControl.h.

Definition at line 50 of file SerialCommand.def.

◆ COMMAND_UPDATE_SERIALVAR

#define COMMAND_UPDATE_SERIALVAR   61

Command to update a serial variable.

Definition at line 58 of file SerialCommand.def.

◆ SERIAL_COMMANDS

#define SERIAL_COMMANDS
Value:
#define COMMAND_SEND_ECHO
Command to listen for a can message to echo, for Echo.h.
#define COMMAND_UPDATE_SERIALVAR
Command to update a serial variable.
#define COMMAND_TOGGLE_REVERSE
Command to enable reverse motors, for MotorControl.h.
#define COMMAND_TOGGLE_MIRROR_MODE
Command to enable mirror mode, for Mirror.h.
#define COMMAND_TOGGLE_CANBUS_SNIFF
Command used to enable the ASCII canbus sniffer.
#define COMMAND_SEND_CANBUS_MESSAGE
Command used to listen for a canbus message to send.
#define COMMAND_PRINT_LOOKUP
Command to send the compressed lookup table over serial.
#define COMMAND_ENABLE_CHARGING
Command used to enable charging.
#define COMMAND_ENTER_MIRROR_SET
Command to listen for a pin to set, for Mirror.h.

Defines commands that the ECU must react to.

Note
the function callback must then be set later using Cmd::setCommand

Unless it is the last entry, this is how to add a new message

X(Value) \

Only the last entry should NOT have a '\'

Definition at line 72 of file SerialCommand.def.