1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2025-04-10 23:40:12 +02:00

Not yet complete

This commit is contained in:
Asbelos 2025-02-11 20:04:38 +00:00
parent 226ce46d96
commit b0b89a429d

View File

@ -634,7 +634,7 @@
#define INVERT_DIRECTION #define INVERT_DIRECTION
/** /**
* @def JMRI_SENSOR(vpin,count...) * @def JMRI_SENSOR(vpin,count...)
* @brief DEfines multiple JMRI <s> type sensor feedback definitions each with id matching vpin * @brief Defines multiple JMRI <s> type sensor feedback definitions each with id matching vpin
* @param vpin first vpin number * @param vpin first vpin number
* @param count... Number of consecutine VPINS for which to create JMRI sensor feedbacks. Default 1. * @param count... Number of consecutine VPINS for which to create JMRI sensor feedbacks. Default 1.
*/ */
@ -687,7 +687,7 @@
#define SCREEN(display,row,msg) #define SCREEN(display,row,msg)
/** /**
* @def LCN(msg) * @def LCN(msg)
* @brief ?????? * @brief Reserved for LCN communication. Refer to their documentation.
* @param msg * @param msg
*/ */
#define LCN(msg) #define LCN(msg)
@ -758,7 +758,7 @@
#define ONACTIVATE(addr,subaddr) #define ONACTIVATE(addr,subaddr)
/** /**
* @def ONACTIVATEL(linear) * @def ONACTIVATEL(linear)
* @brief Start task here when DCC Activate sent for long address * @brief Start task here when DCC Activate sent for linear address
* @param linear * @param linear
*/ */
#define ONACTIVATEL(linear) #define ONACTIVATEL(linear)
@ -771,7 +771,7 @@
/** /**
* @def ONTIME(minute_in_day) * @def ONTIME(minute_in_day)
* @brief Start task here when fastclock matches * @brief Start task here when fastclock matches
* @param minute_in_date (0..1439) * @param minute_in_day (0..1439)
*/ */
#define ONTIME(minute_in_day) #define ONTIME(minute_in_day)
/** /**
@ -814,7 +814,7 @@
#define ONCLOSE(turnout_id) #define ONCLOSE(turnout_id)
/** /**
* @def ONLCC(sender,event) * @def ONLCC(sender,event)
* @brief ?????????????????? * @brief Start task here when LCC event arrives from sender
* @param sender * @param sender
* @param event * @param event
*/ */
@ -844,9 +844,9 @@
*/ */
#define ONTHROW(turnout_id) #define ONTHROW(turnout_id)
/** /**
* @def ONCHANGE(sensor_id) * @def ONCHANGE(vpin)
* @brief ??????????????????? * @brief ??? something strange in RotaryEncoder HAL...
* @param sensor_id * @param vpin
*/ */
#define ONCHANGE(sensor_id) #define ONCHANGE(sensor_id)
/** /**
@ -869,13 +869,13 @@
#define PAUSE #define PAUSE
/** /**
* @def PIN_TURNOUT(id,pin,description...) * @def PIN_TURNOUT(id,pin,description...)
* @brief Defines a tirnout which operates on a signle pin * @brief Defines a turnout which operates on a signle pin
* @param id * @param id
* @param pin * @param pin
* @param description... Quoted text (shown to throttles) or HIDDEN * @param description... Quoted text (shown to throttles) or HIDDEN
*/ */
#define PIN_TURNOUT(id,pin,description...) #define PIN_TURNOUT(id,vpin,description...)
/** /**
* @def PRINT(msg) * @def PRINT(msg)
* @brief prints diagnostic message on USB serial * @brief prints diagnostic message on USB serial
@ -913,7 +913,7 @@
#define POWERON #define POWERON
/** /**
* @def READ_LOCO * @def READ_LOCO
* @brief Reads loco Id from prog traqck and sets currenmt task loco id. * @brief Reads loco Id from prog track and sets currenmt task loco id.
*/ */
#define READ_LOCO #define READ_LOCO
/** /**
@ -923,18 +923,19 @@
*/ */
#define RED(signal_id) #define RED(signal_id)
/** /**
* @def RESERVE(blockid) * @def RESERVE(token_id)
* @brief Waits for token for block. If not available immediately, current task loco is stopped. * @brief Waits for token for block. If not available immediately, current task loco is stopped.
* @param blockid * @param token_id
*/ */
#define RESERVE(blockid) #define RESERVE(token_id)
/** /**
* @def RESET(pin,count...) * @def RESET(vpin,count...)
* @brief Sets output puin LOW * @brief Sets output pin LOW
* @param pin * @see SET
* @param vpin
* @param count... Number of consecutive pins, default 1 * @param count... Number of consecutive pins, default 1
*/ */
#define RESET(pin,count...) #define RESET(vpin,count...)
/** /**
* @def RESUME * @def RESUME
* @brief Resumes PAUSEd tasks * @brief Resumes PAUSEd tasks
@ -974,64 +975,64 @@
* @brief Describes a loco roster entry visible to throttles * @brief Describes a loco roster entry visible to throttles
* @param cab loco DCC address or 0 for default entry * @param cab loco DCC address or 0 for default entry
* @param name Quoted text * @param name Quoted text
* @param funcmap... Quoted text, optional list of function names separated by / character with momentary fuinctin names prefixed with an *. * @param funcmap... Quoted text, optional list of function names separated by / character with momentary function names prefixed with an *.
* *
*/ */
#define ROSTER(cab,name,funcmap...) #define ROSTER(cab,name,funcmap...)
/** /**
* @def ROUTE(id,description) * @def ROUTE(sequence_id,description)
* @brief DEfines starting point of a sequence that will appear as a route on throttle buttons. * @brief DEfines starting point of a sequence that will appear as a route on throttle buttons.
* @param id * @param sequence_id
* @param description Quoted text, throttle button capotion. * @param description Quoted text, throttle button capotion.
*/ */
#define ROUTE(id,description) #define ROUTE(sequence_id,description)
/** /**
* @def ROUTE_ACTIVE(id) * @def ROUTE_ACTIVE(sequence_id)
* @brief Tells throttle to display the route button as active * @brief Tells throttle to display the route button as active
* @param id * @param sequence_id of ROUTE/AUTOMATION
*/ */
#define ROUTE_ACTIVE(id) #define ROUTE_ACTIVE(sequence_id)
/** /**
* @def ROUTE_INACTIVE(id) * @def ROUTE_INACTIVE(sequence_id)
* @brief Tells throttle to display the route button as inactive * @brief Tells throttle to display the route button as inactive
* @param id * @param sequence_id of ROUTE/AUTOMATION
*/ */
#define ROUTE_INACTIVE(id) #define ROUTE_INACTIVE(sequence_id)
/** /**
* @def ROUTE_HIDDEN(id) * @def ROUTE_HIDDEN(sequence_id)
* @brief Tells throttle to hide the route button * @brief Tells throttle to hide the route button
* @param id * @param sequence_id of ROUTE/AUTOMATION
*/ */
#define ROUTE_HIDDEN(id) #define ROUTE_HIDDEN(sequence_id)
/** /**
* @def ROUTE_DISABLED(id) * @def ROUTE_DISABLED(sequence_id)
* @brief Tells throttle to display the route button as disabled * @brief Tells throttle to display the route button as disabled
* @param id * @param sequence_id of ROUTE/AUTOMATION
*/ */
#define ROUTE_DISABLED(id) #define ROUTE_DISABLED(sequence_id)
/** /**
* @def ROUTE_CAPTION(id,caption) * @def ROUTE_CAPTION(sequence_id,caption)
* @brief Tells throttle to change thr route button caption * @brief Tells throttle to change thr route button caption
* @param id * @param sequence_id of ROUTE/AUTOMATION
* @param caption * @param caption
*/ */
#define ROUTE_CAPTION(id,caption) #define ROUTE_CAPTION(sequence_id,caption)
/** /**
* @def SENDLOCO(cab,route) * @def SENDLOCO(cab,sequence_id)
* @brief Start a new task to drive the loco * @brief Start a new task to drive the loco
* @param cab loco to be driven * @param cab loco to be driven
* @param route id of route/automation or sequence to drive * @param route sequence_id of route, automation or sequence to drive
*/ */
#define SENDLOCO(cab,route) #define SENDLOCO(cab,sequence_id)
/** /**
* @def SEQUENCE(id) * @def SEQUENCE(sequence_id)
* @brief Provides a unique label than can be used to call, follow or start. * @brief Provides a unique label than can be used to call, follow or start.
* @see CALL * @see CALL
* @see FOLLOW * @see FOLLOW
* @see START * @see START
* @param id * @param sequence_id
*/ */
#define SEQUENCE(id) #define SEQUENCE(sequence_id)
/** /**
* @def SERIAL(msg) * @def SERIAL(msg)
* @brief Write direct to Serial output * @brief Write direct to Serial output
@ -1075,48 +1076,49 @@
*/ */
#define SERIAL6(msg) #define SERIAL6(msg)
/** /**
* @def SERVO(id,position,profile) * @def SERVO(vpin,position,profile)
* @brief Move servo to given position * @brief Move servo to given position
* @param id VPIN of servo * @param vpin of servo
* @param position * @param position servo poisition (values are hardware dependent)
* @param profile ?????????? names ??????????? * @param profile movement profile (Instant, Fast, Medium, Slow, Bounce)
*/ */
#define SERVO(id,position,profile) #define SERVO(vpin,position,profile)
/** /**
* @def SERVO2(id,position,duration) * @def SERVO2(id,position,duration)
* @brief Move servo to given position taking time * @brief Move servo to given position taking time
* @param id * @param vpin of servo
* @param position * @param position servo poisition (values are hardware dependent)
* @param duration mS * @param duration mS
*/ */
#define SERVO2(id,position,duration) #define SERVO2(vpin,position,duration)
/** /**
* @def SERVO_SIGNAL(vpin,redpos,amberpos,greenpos) * @def SERVO_SIGNAL(vpin,redpos,amberpos,greenpos)
* @brief Dedfine a servo based signal with 3 servo positions * @brief Dedfine a servo based signal with 3 servo positions
* @param vpin * @param vpin of servo, acts as signal_id
* @param redpos * @param redpos servo poisition (values are hardware dependent)
* @param amberpos * @param amberpos servo poisition (values are hardware dependent)
* @param greenpos * @param greenpos servo poisition (values are hardware dependent)
*/ */
#define SERVO_SIGNAL(vpin,redpos,amberpos,greenpos) #define SERVO_SIGNAL(vpin,redpos,amberpos,greenpos)
/** /**
* @def SERVO_TURNOUT(id,pin,activeAngle,inactiveAngle,profile,description...) * @def SERVO_TURNOUT(turnout_id,vpin,activeAngle,inactiveAngle,profile,description...)
* @brief Define a servo driven turnout * @brief Define a servo driven turnout
* @param id used by THROW/CLOSE * @param turnout_id used by THROW/CLOSE
* @param pin VPIN for servo * @param vpin for servo
* @param activeAngle * @param activeAngle servo poisition (values are hardware dependent)
* @param inactiveAngle * @param inactiveAngle servo poisition (values are hardware dependent)
* @param profile ?????? * @param profile movement profile (Instant, Fast, Medium, Slow, Bounce)
* @param description... Quoted text shown to throttles or HIDDEN keyword to hide turnout button * @param description... Quoted text shown to throttles or HIDDEN keyword to hide turnout button
*/ */
#define SERVO_TURNOUT(id,pin,activeAngle,inactiveAngle,profile,description...) #define SERVO_TURNOUT(turnout_id,vpin,activeAngle,inactiveAngle,profile,description...)
/** /**
* @def SET(pin,count...) * @def SET(vpin,count...)
* @brief Set VPIN HIGH * @brief Set pin HIGH
* @param pin * @see RESET
* @param vpin
* @param count... Number of sequential vpins to set. Default 1. * @param count... Number of sequential vpins to set. Default 1.
*/ */
#define SET(pin,count...) #define SET(vpin,count...)
/** /**
* @def SET_TRACK(track,mode) * @def SET_TRACK(track,mode)
* @brief Set output track type * @brief Set output track type
@ -1147,7 +1149,7 @@
* @def SIGNAL(redpin,amberpin,greenpin) * @def SIGNAL(redpin,amberpin,greenpin)
* @brief Define a Signal with LOW=on leds (is that common annode???) * @brief Define a Signal with LOW=on leds (is that common annode???)
* @see SIGNALH * @see SIGNALH
* @param redpin * @param redpin vpin for RED state, also acts as signal_id
* @param amberpin * @param amberpin
* @param greenpin * @param greenpin
*/ */
@ -1155,7 +1157,7 @@
/** /**
* @def SIGNALH(redpin,amberpin,greenpin) * @def SIGNALH(redpin,amberpin,greenpin)
* @brief define a signal with HIGH=ON leds * @brief define a signal with HIGH=ON leds
* @param redpin * @param redpin vpin for RED state, also acts as signal_id
* @param amberpin * @param amberpin
* @param greenpin * @param greenpin
*/ */
@ -1167,46 +1169,48 @@
*/ */
#define SPEED(speed) #define SPEED(speed)
/** /**
* @def START(route) * @def START(sequence_id)
* @brief Starts a new task at the given route/animation/sequence * @brief Starts a new task at the given route/animation/sequence
* @param route * @param sequence_id
*/ */
#define START(route) #define START(sequence_id)
/** /**
* @def STASH(id) * @def STASH(stash_id)
* @brief saves cuttent tasks loco id in the stash array * @brief saves cuttent tasks loco id in the stash array
* @param id * @param stash_id position in stash array to save loco id
*/ */
#define STASH(id) #define STASH(stash_id)
/** /**
* @def STEALTH(code...) * @def STEALTH(code...)
* @brief Allows for embedding raw C++ code in context of current task. * @brief Allows for embedding raw C++ code in context of current task.
* @param code... * @param code... c++ code to be executed. This requires intimate understanding of the product acrhitecture.
*/ */
#define STEALTH(code...) #define STEALTH(code...)
/** /**
* @def STEALTH_GLOBAL(code...) * @def STEALTH_GLOBAL(code...)
* @brief Allows for embedding raw c++ code out of context. * @brief Allows for embedding raw c++ code out of context.
* @param code... * @param code... c++ code to be defined. This requires intimate understanding of the product acrhitecture.
*/ */
#define STEALTH_GLOBAL(code...) #define STEALTH_GLOBAL(code...)
/** /**
* @def STOP * @def STOP
* @brief Same as SPEED(0) * @brief Same as SPEED(0)
* @see SPEED
*/ */
#define STOP #define STOP
/** /**
* @def THROW(id) * @def THROW(turnout_id)
* @brief Throws given turnout * @brief Throws given turnout
* @param id * @see CLOSE
* @param turnout_id
*/ */
#define THROW(id) #define THROW(turnout_id)
/** /**
* @def TOGGLE_TURNOUT(id) * @def TOGGLE_TURNOUT(turnout_id)
* @brief Toggles given turnout * @brief Toggles given turnout
* @param id * @param tuirnout_id
*/ */
#define TOGGLE_TURNOUT(id) #define TOGGLE_TURNOUT(turnout_id)
/** /**
* @def TT_ADDPOSITION(turntable_id,position,value,angle,description...) * @def TT_ADDPOSITION(turntable_id,position,value,angle,description...)
* @brief Defines a turntable track position * @brief Defines a turntable track position
@ -1218,23 +1222,23 @@
*/ */
#define TT_ADDPOSITION(turntable_id,position,value,angle,description...) #define TT_ADDPOSITION(turntable_id,position,value,angle,description...)
/** /**
* @def TURNOUT(id,addr,subaddr,description...) * @def TURNOUT(turnout_id,addr,subaddr,description...)
* @brief Defines a DCC accessory turnout with legacy address * @brief Defines a DCC accessory turnout with legacy address
* @param id * @param turnout_id to be used in THROW/CLOSE etc
* @param addr * @param addr DCC accessory address
* @param subaddr * @param subaddr DCC accessory subaddress
* @param description... Quoted text or HIDDEN, appears on throttle buttons * @param description... Quoted text or HIDDEN, appears on throttle buttons
*/ */
#define TURNOUT(id,addr,subaddr,description...) #define TURNOUT(turnout_id,addr,subaddr,description...)
/** /**
* @def TURNOUTL(id,addr,description...) * @def TURNOUTL(turnout_id,addr,description...)
* @brief Defines a DCC accessory turnout with inear address * @brief Defines a DCC accessory turnout with inear address
* @param * @see TURNOUT
* @param id * @param turnout_id to be used in THROW/CLOSE etc
* @param addr * @param addr DCC accessory linear address
* @param description... * @param description... Quoted text or HIDDEN, appears on throttle buttons
*/ */
#define TURNOUTL(id,addr,description...) #define TURNOUTL(tirnout_id,addr,description...)
/** /**
* @def UNJOIN * @def UNJOIN
* @brief Disconnects PROG track from MAIN * @brief Disconnects PROG track from MAIN
@ -1242,35 +1246,35 @@
*/ */
#define UNJOIN #define UNJOIN
/** /**
* @def UNLATCH(sensor_id) * @def UNLATCH(vpin)
* @brief removes latched on flag * @brief removes latched on flag
* @see LATCH * @see LATCH
* @param sensor_id * @param vpin (limited to 0..255)
*/ */
#define UNLATCH(sensor_id) #define UNLATCH(vpin)
/** /**
* @def VIRTUAL_SIGNAL(id) * @def VIRTUAL_SIGNAL(signal_id)
* @brief Defines a virtual (no hardware) signal * @brief Defines a virtual (no hardware) signal
* @param id * @param signal_id
*/ */
#define VIRTUAL_SIGNAL(id) #define VIRTUAL_SIGNAL(signal_id)
/** /**
* @def VIRTUAL_TURNOUT(id,description...) * @def VIRTUAL_TURNOUT(turnout_id,description...)
* @brief Defines a virtual (no hardware) turnout * @brief Defines a virtual (no hardware) turnout
* @param id * @param turnout_id
* @param description... * @param description...
*/ */
#define VIRTUAL_TURNOUT(id,description...) #define VIRTUAL_TURNOUT(id,description...)
/** /**
* @def WAITFOR(pin) * @def WAITFOR(vpin)
* @brief ??????????????????? * @brief WAits for completion of servo movement
* @param pin * @param vpin
*/ */
#define WAITFOR(pin) #define WAITFOR(pin)
#ifndef IO_NO_HAL #ifndef IO_NO_HAL
/** /**
* @def WAITFORTT(turntable_id) * @def WAITFORTT(turntable_id)
* @brief * @brief waits for completion of turntable movement
* @param turntable_id * @param turntable_id
*/ */
#define WAITFORTT(turntable_id) #define WAITFORTT(turntable_id)
@ -1278,14 +1282,14 @@
/** /**
* @def WITHROTTLE(msg) * @def WITHROTTLE(msg)
* @brief Broadcasts a string in Withrottle protocol format to all throttles using this protocol. * @brief Broadcasts a string in Withrottle protocol format to all throttles using this protocol.
* @param msg * @param msg quoted string
*/ */
#define WITHROTTLE(msg) #define WITHROTTLE(msg)
/** /**
* @def XFOFF(cab,func) * @def XFOFF(cab,func)
* @brief Turns function off for given loco * @brief Turns function off for given loco
* @param cab * @param cab
* @param func * @param func function number
*/ */
#define XFOFF(cab,func) #define XFOFF(cab,func)
/** /**