2021-11-27 12:29:26 +01:00
|
|
|
|
/*
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* © 2020-2025 Chris Harlow. All rights reserved.
|
2023-08-12 19:40:48 +02:00
|
|
|
|
* © 2022-2023 Colin Murdoch
|
2023-01-27 17:03:39 +01:00
|
|
|
|
* © 2023 Harald Barth
|
2025-01-09 20:40:07 +01:00
|
|
|
|
* © 2025 Morten Nielsen
|
2021-11-27 12:29:26 +01:00
|
|
|
|
*
|
|
|
|
|
* This file is part of CommandStation-EX
|
|
|
|
|
*
|
|
|
|
|
* This is free software: you can redistribute it and/or modify
|
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
|
|
|
* (at your option) any later version.
|
|
|
|
|
*
|
|
|
|
|
* It is distributed in the hope that it will be useful,
|
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
|
*
|
|
|
|
|
* You should have received a copy of the GNU General Public License
|
2025-02-02 13:29:12 +01:00
|
|
|
|
* along with CommandStation. If not, see https://www.gnu.org/licenses/.
|
2021-11-27 12:29:26 +01:00
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
// This file cleans and resets the RMFT2 Macros.
|
|
|
|
|
// It is used between passes to reduce complexity in RMFT2Macros.h
|
|
|
|
|
// DO NOT add an include guard to this file.
|
|
|
|
|
|
2025-02-02 13:29:12 +01:00
|
|
|
|
// Doxygen comments in this file are intended for the EXRAIL end user.
|
|
|
|
|
|
2021-11-27 12:29:26 +01:00
|
|
|
|
// Undefine all RMFT macros
|
|
|
|
|
#undef ACTIVATE
|
|
|
|
|
#undef ACTIVATEL
|
|
|
|
|
#undef AFTER
|
2023-09-05 13:21:09 +02:00
|
|
|
|
#undef AFTEROVERLOAD
|
2021-11-27 12:29:26 +01:00
|
|
|
|
#undef ALIAS
|
|
|
|
|
#undef AMBER
|
2023-02-04 21:56:12 +01:00
|
|
|
|
#undef ANOUT
|
2024-02-15 21:05:27 +01:00
|
|
|
|
#undef ASPECT
|
2021-11-27 12:29:26 +01:00
|
|
|
|
#undef AT
|
2022-03-18 14:46:07 +01:00
|
|
|
|
#undef ATGTE
|
|
|
|
|
#undef ATLT
|
2022-01-03 11:15:10 +01:00
|
|
|
|
#undef ATTIMEOUT
|
2021-11-27 12:29:26 +01:00
|
|
|
|
#undef AUTOMATION
|
|
|
|
|
#undef AUTOSTART
|
2024-04-09 21:45:28 +02:00
|
|
|
|
#undef BLINK
|
2022-03-07 17:30:47 +01:00
|
|
|
|
#undef BROADCAST
|
2021-11-27 12:29:26 +01:00
|
|
|
|
#undef CALL
|
2023-11-23 11:41:35 +01:00
|
|
|
|
#undef CLEAR_STASH
|
|
|
|
|
#undef CLEAR_ALL_STASH
|
2021-11-27 12:29:26 +01:00
|
|
|
|
#undef CLOSE
|
2024-02-09 12:54:53 +01:00
|
|
|
|
#undef CONFIGURE_SERVO
|
2022-06-18 13:31:54 +02:00
|
|
|
|
#undef DCC_SIGNAL
|
2024-02-16 12:49:02 +01:00
|
|
|
|
#undef DCCX_SIGNAL
|
2023-09-02 00:29:49 +02:00
|
|
|
|
#undef DCC_TURNTABLE
|
2021-11-27 12:29:26 +01:00
|
|
|
|
#undef DEACTIVATE
|
|
|
|
|
#undef DEACTIVATEL
|
|
|
|
|
#undef DELAY
|
|
|
|
|
#undef DELAYMINS
|
|
|
|
|
#undef DELAYRANDOM
|
|
|
|
|
#undef DONE
|
|
|
|
|
#undef DRIVE
|
2022-01-02 20:41:57 +01:00
|
|
|
|
#undef ELSE
|
2021-11-27 12:29:26 +01:00
|
|
|
|
#undef ENDEXRAIL
|
|
|
|
|
#undef ENDIF
|
|
|
|
|
#undef ENDTASK
|
2023-09-02 00:29:49 +02:00
|
|
|
|
#undef ESTOP
|
|
|
|
|
#undef EXRAIL
|
|
|
|
|
#undef EXTT_TURNTABLE
|
2021-11-27 12:29:26 +01:00
|
|
|
|
#undef FADE
|
|
|
|
|
#undef FOFF
|
|
|
|
|
#undef FOLLOW
|
|
|
|
|
#undef FON
|
2022-03-24 11:40:49 +01:00
|
|
|
|
#undef FORGET
|
2024-04-09 21:45:28 +02:00
|
|
|
|
#undef FTOGGLE
|
2021-11-27 12:29:26 +01:00
|
|
|
|
#undef FREE
|
|
|
|
|
#undef FWD
|
|
|
|
|
#undef GREEN
|
2022-06-15 12:44:46 +02:00
|
|
|
|
#undef HAL
|
2024-01-14 21:20:22 +01:00
|
|
|
|
#undef HAL_IGNORE_DEFAULTS
|
2021-11-27 12:29:26 +01:00
|
|
|
|
#undef IF
|
2022-04-17 10:58:32 +02:00
|
|
|
|
#undef IFAMBER
|
2021-12-29 12:15:31 +01:00
|
|
|
|
#undef IFCLOSED
|
2022-04-17 10:58:32 +02:00
|
|
|
|
#undef IFGREEN
|
2021-11-30 14:52:22 +01:00
|
|
|
|
#undef IFGTE
|
2023-01-26 16:55:58 +01:00
|
|
|
|
#undef IFLOCO
|
2021-11-30 14:52:22 +01:00
|
|
|
|
#undef IFLT
|
2021-11-27 12:29:26 +01:00
|
|
|
|
#undef IFNOT
|
|
|
|
|
#undef IFRANDOM
|
2022-04-17 10:58:32 +02:00
|
|
|
|
#undef IFRED
|
2021-11-27 12:29:26 +01:00
|
|
|
|
#undef IFRESERVE
|
2021-12-29 12:15:31 +01:00
|
|
|
|
#undef IFTHROWN
|
2022-01-03 11:15:10 +01:00
|
|
|
|
#undef IFTIMEOUT
|
2023-09-02 00:29:49 +02:00
|
|
|
|
#undef IFTTPOSITION
|
2022-12-30 00:46:42 +01:00
|
|
|
|
#undef IFRE
|
2021-11-27 12:29:26 +01:00
|
|
|
|
#undef INVERT_DIRECTION
|
2024-02-07 23:11:27 +01:00
|
|
|
|
#undef JMRI_SENSOR
|
2021-11-27 12:29:26 +01:00
|
|
|
|
#undef JOIN
|
2022-03-31 22:52:43 +02:00
|
|
|
|
#undef KILLALL
|
2021-11-27 12:29:26 +01:00
|
|
|
|
#undef LATCH
|
|
|
|
|
#undef LCD
|
2023-02-12 00:37:09 +01:00
|
|
|
|
#undef SCREEN
|
2023-10-13 14:59:06 +02:00
|
|
|
|
#undef LCC
|
|
|
|
|
#undef LCCX
|
2021-11-27 12:29:26 +01:00
|
|
|
|
#undef LCN
|
2022-08-13 22:48:03 +02:00
|
|
|
|
#undef MOVETT
|
2024-09-22 13:36:19 +02:00
|
|
|
|
#undef NEOPIXEL
|
|
|
|
|
#undef NEOPIXEL_OFF
|
|
|
|
|
#undef NEOPIXEL_SIGNAL
|
2024-06-13 14:01:33 +02:00
|
|
|
|
#undef ACON
|
|
|
|
|
#undef ACOF
|
|
|
|
|
#undef ONACON
|
|
|
|
|
#undef ONACOF
|
2024-03-08 21:33:11 +01:00
|
|
|
|
#undef MESSAGE
|
2021-11-27 12:29:26 +01:00
|
|
|
|
#undef ONACTIVATE
|
|
|
|
|
#undef ONACTIVATEL
|
2022-06-17 12:48:37 +02:00
|
|
|
|
#undef ONAMBER
|
2021-11-27 12:29:26 +01:00
|
|
|
|
#undef ONDEACTIVATE
|
|
|
|
|
#undef ONDEACTIVATEL
|
|
|
|
|
#undef ONCLOSE
|
2023-10-13 14:59:06 +02:00
|
|
|
|
#undef ONLCC
|
2023-01-11 18:36:11 +01:00
|
|
|
|
#undef ONTIME
|
|
|
|
|
#undef ONCLOCKTIME
|
2023-04-12 13:07:08 +02:00
|
|
|
|
#undef ONCLOCKMINS
|
2023-08-12 19:40:48 +02:00
|
|
|
|
#undef ONOVERLOAD
|
2022-06-17 12:48:37 +02:00
|
|
|
|
#undef ONGREEN
|
|
|
|
|
#undef ONRED
|
2023-09-02 00:29:49 +02:00
|
|
|
|
#undef ONROTATE
|
2024-04-13 09:12:35 +02:00
|
|
|
|
#undef ONBUTTON
|
|
|
|
|
#undef ONSENSOR
|
2021-11-27 12:29:26 +01:00
|
|
|
|
#undef ONTHROW
|
2022-12-30 00:46:42 +01:00
|
|
|
|
#undef ONCHANGE
|
2022-03-31 23:04:40 +02:00
|
|
|
|
#undef PARSE
|
2021-11-27 12:29:26 +01:00
|
|
|
|
#undef PAUSE
|
2023-11-23 11:41:35 +01:00
|
|
|
|
#undef PICKUP_STASH
|
2021-11-27 12:29:26 +01:00
|
|
|
|
#undef PIN_TURNOUT
|
|
|
|
|
#undef PRINT
|
|
|
|
|
#undef POM
|
|
|
|
|
#undef POWEROFF
|
2022-02-28 11:38:26 +01:00
|
|
|
|
#undef POWERON
|
2021-11-27 12:29:26 +01:00
|
|
|
|
#undef READ_LOCO
|
|
|
|
|
#undef RED
|
|
|
|
|
#undef RESERVE
|
|
|
|
|
#undef RESET
|
|
|
|
|
#undef RESUME
|
|
|
|
|
#undef RETURN
|
2021-12-26 19:24:04 +01:00
|
|
|
|
#undef REV
|
2023-09-02 00:29:49 +02:00
|
|
|
|
#undef ROSTER
|
|
|
|
|
#undef ROTATE
|
2023-09-08 23:22:10 +02:00
|
|
|
|
#undef ROTATE_DCC
|
2021-11-27 12:29:26 +01:00
|
|
|
|
#undef ROUTE
|
2023-11-09 20:27:52 +01:00
|
|
|
|
#undef ROUTE_ACTIVE
|
|
|
|
|
#undef ROUTE_INACTIVE
|
2023-11-07 17:27:26 +01:00
|
|
|
|
#undef ROUTE_HIDDEN
|
2023-11-17 11:45:36 +01:00
|
|
|
|
#undef ROUTE_DISABLED
|
2023-11-07 17:27:26 +01:00
|
|
|
|
#undef ROUTE_CAPTION
|
2021-11-27 12:29:26 +01:00
|
|
|
|
#undef SENDLOCO
|
|
|
|
|
#undef SEQUENCE
|
|
|
|
|
#undef SERIAL
|
|
|
|
|
#undef SERIAL1
|
|
|
|
|
#undef SERIAL2
|
|
|
|
|
#undef SERIAL3
|
2022-12-16 14:14:48 +01:00
|
|
|
|
#undef SERIAL4
|
|
|
|
|
#undef SERIAL5
|
|
|
|
|
#undef SERIAL6
|
2021-11-27 12:29:26 +01:00
|
|
|
|
#undef SERVO
|
|
|
|
|
#undef SERVO2
|
|
|
|
|
#undef SERVO_TURNOUT
|
2022-02-06 14:56:51 +01:00
|
|
|
|
#undef SERVO_SIGNAL
|
2021-11-27 12:29:26 +01:00
|
|
|
|
#undef SET
|
2022-03-19 17:26:29 +01:00
|
|
|
|
#undef SET_TRACK
|
2023-09-24 16:40:42 +02:00
|
|
|
|
#undef SET_POWER
|
2021-11-27 12:29:26 +01:00
|
|
|
|
#undef SETLOCO
|
2024-01-20 19:09:03 +01:00
|
|
|
|
#undef SETFREQ
|
2021-11-27 12:29:26 +01:00
|
|
|
|
#undef SIGNAL
|
2022-03-18 14:46:07 +01:00
|
|
|
|
#undef SIGNALH
|
2021-11-27 12:29:26 +01:00
|
|
|
|
#undef SPEED
|
|
|
|
|
#undef START
|
2023-11-23 11:41:35 +01:00
|
|
|
|
#undef STASH
|
2023-11-30 12:32:39 +01:00
|
|
|
|
#undef STEALTH
|
2024-04-09 21:45:28 +02:00
|
|
|
|
#undef STEALTH_GLOBAL
|
2021-11-27 12:29:26 +01:00
|
|
|
|
#undef STOP
|
2023-09-02 00:29:49 +02:00
|
|
|
|
#undef THROW
|
2024-04-09 21:45:28 +02:00
|
|
|
|
#undef TOGGLE_TURNOUT
|
2023-09-02 00:29:49 +02:00
|
|
|
|
#undef TT_ADDPOSITION
|
2021-11-27 12:29:26 +01:00
|
|
|
|
#undef TURNOUT
|
2023-04-08 18:22:39 +02:00
|
|
|
|
#undef TURNOUTL
|
2021-11-27 12:29:26 +01:00
|
|
|
|
#undef UNJOIN
|
|
|
|
|
#undef UNLATCH
|
2022-06-18 13:31:54 +02:00
|
|
|
|
#undef VIRTUAL_SIGNAL
|
2022-03-24 12:56:06 +01:00
|
|
|
|
#undef VIRTUAL_TURNOUT
|
2021-11-27 12:29:26 +01:00
|
|
|
|
#undef WAITFOR
|
2023-09-06 23:58:19 +02:00
|
|
|
|
#ifndef IO_NO_HAL
|
|
|
|
|
#undef WAITFORTT
|
|
|
|
|
#endif
|
2023-05-01 15:25:45 +02:00
|
|
|
|
#undef WITHROTTLE
|
2021-11-27 12:29:26 +01:00
|
|
|
|
#undef XFOFF
|
|
|
|
|
#undef XFON
|
2024-04-09 21:45:28 +02:00
|
|
|
|
#undef XFTOGGLE
|
2025-01-09 20:40:07 +01:00
|
|
|
|
#undef XREV
|
|
|
|
|
#undef XFWD
|
2021-11-27 12:29:26 +01:00
|
|
|
|
|
|
|
|
|
#ifndef RMFT2_UNDEF_ONLY
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
|
|
|
|
* @def ACTIVATE(addr,subaddr)
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief Send DCC Accessory Activate packet (gate on then off)
|
2025-02-06 21:00:28 +01:00
|
|
|
|
* @param addr DCC short address of accessory
|
|
|
|
|
* @param subaddr DCC sub address
|
2025-02-02 13:29:12 +01:00
|
|
|
|
*/
|
2021-11-27 12:29:26 +01:00
|
|
|
|
#define ACTIVATE(addr,subaddr)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
2025-02-06 21:00:28 +01:00
|
|
|
|
* @def ACTIVATEL(linearaddr)
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief Send DCC Accessory Activate packet (gate on then off)
|
2025-02-06 21:00:28 +01:00
|
|
|
|
* @param linearaddr DCC linear address of accessory
|
2025-02-02 13:29:12 +01:00
|
|
|
|
*/
|
2025-02-06 21:00:28 +01:00
|
|
|
|
#define ACTIVATEL(linearaddr)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
2025-02-06 21:00:28 +01:00
|
|
|
|
* @def AFTER(vpin,timer...)
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief Wait for sensor activated, then decativated for given time
|
2025-02-06 21:00:28 +01:00
|
|
|
|
* @param vpin Virtual Pin number of sensor
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @param timer... optional wait in mS, default 500
|
2025-02-02 13:29:12 +01:00
|
|
|
|
*/
|
2025-02-06 21:00:28 +01:00
|
|
|
|
#define AFTER(vpin,timer...)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
|
|
|
|
* @def AFTEROVERLOAD(track_id)
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief Wait for overload to be resolved
|
|
|
|
|
* @param track_id A..H
|
2025-02-02 13:29:12 +01:00
|
|
|
|
*/
|
2023-09-05 13:21:09 +02:00
|
|
|
|
#define AFTEROVERLOAD(track_id)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
|
|
|
|
* @def ALIAS(name,value...)
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief defines a named numeric value.
|
2025-02-06 21:00:28 +01:00
|
|
|
|
* @param name c++ variable name that can be used throighout the script
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @param value... if omitted, a large negative value is created automatically
|
2025-02-02 13:29:12 +01:00
|
|
|
|
*/
|
2022-03-21 17:29:35 +01:00
|
|
|
|
#define ALIAS(name,value...)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
|
|
|
|
* @def AMBER(signal_id)
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief Sets a signal to amber state
|
2025-02-06 21:00:28 +01:00
|
|
|
|
* @see ONAMBER
|
2025-02-02 13:29:12 +01:00
|
|
|
|
* @param signal_id
|
|
|
|
|
*/
|
2021-11-27 12:29:26 +01:00
|
|
|
|
#define AMBER(signal_id)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
|
|
|
|
* @def ANOUT(vpin,value,param1,param2)
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief Writes to the HAL analog output interface of a device driver.
|
|
|
|
|
* Values and meanings of extra parameters depend on driver.
|
|
|
|
|
* @param vpin Virtual pin number of device
|
|
|
|
|
* @param value basic analog value
|
|
|
|
|
* @param param1 device dependent
|
|
|
|
|
* @param param2 device dependent
|
2025-02-02 13:29:12 +01:00
|
|
|
|
*/
|
2023-02-04 21:56:12 +01:00
|
|
|
|
#define ANOUT(vpin,value,param1,param2)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
2025-02-06 21:00:28 +01:00
|
|
|
|
* @def AT(vpin)
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief wait intil a sensor becomes active
|
2025-02-06 21:00:28 +01:00
|
|
|
|
* @param vpin Virtual pin of sensor. Use negative value for sensors that are HIGH when activated
|
2025-02-02 13:29:12 +01:00
|
|
|
|
*/
|
2025-02-06 21:00:28 +01:00
|
|
|
|
#define AT(vpin)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
|
|
|
|
* @def ASPECT(address,value)
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief Sends a DCC aspect value to an accessory address.
|
|
|
|
|
* May also change status of a signal defined using this aspect.
|
2025-02-06 21:00:28 +01:00
|
|
|
|
* @param address Linear DCC address of device
|
|
|
|
|
* @param value Aspect value (Device dependent)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
*/
|
2024-02-15 21:05:27 +01:00
|
|
|
|
#define ASPECT(address,value)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
2025-02-06 21:00:28 +01:00
|
|
|
|
* @def ATGTE(vpin,value)
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief Wait for analog sensor to be greater than given value
|
2025-02-06 21:00:28 +01:00
|
|
|
|
* @param vpin Analog pin number
|
|
|
|
|
* @param value integer value to compare against
|
2025-02-02 13:29:12 +01:00
|
|
|
|
*/
|
2025-02-06 21:00:28 +01:00
|
|
|
|
#define ATGTE(vpin,value)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
2025-02-06 21:00:28 +01:00
|
|
|
|
* @def ATLT(vpin,value)
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief Wait for analog sensor value to be less than given value
|
2025-02-06 21:00:28 +01:00
|
|
|
|
* @param vpin Analog pin number
|
|
|
|
|
* @param value integer value to compare against
|
2025-02-02 13:29:12 +01:00
|
|
|
|
*/
|
2025-02-06 21:00:28 +01:00
|
|
|
|
#define ATLT(vpin,value)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
2025-02-06 21:00:28 +01:00
|
|
|
|
* @def ATTIMEOUT(vpin,timeout_ms)
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief Wait for sensor active, with timeout. Use IFTIMEOUT to determine whether the AT was satisfied.
|
|
|
|
|
* @see IFTIMEOUT
|
2025-02-06 21:00:28 +01:00
|
|
|
|
* @param vpin Sensor pin number
|
|
|
|
|
* @param timeout_ms Millseconds to wait before timeout
|
2025-02-02 13:29:12 +01:00
|
|
|
|
*/
|
2025-02-06 21:00:28 +01:00
|
|
|
|
#define ATTIMEOUT(vpin,timeout_ms)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
2025-02-06 21:00:28 +01:00
|
|
|
|
* @def AUTOMATION(sequence_id,description)
|
|
|
|
|
* @brief Defines starting point of a sequence that will be shown as an Automation by
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* the throttles. Automations are started by the throttle handing over a loco id to be driven.
|
2025-02-06 21:00:28 +01:00
|
|
|
|
* @param sequence_id Unique sequence id value
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @param description (Quoted text) will be shown on throttle button
|
2025-02-02 13:29:12 +01:00
|
|
|
|
*/
|
2025-02-06 21:00:28 +01:00
|
|
|
|
#define AUTOMATION(sequence_id,description)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
|
|
|
|
* @def AUTOSTART
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief A new task will be created starting from this point at Command Station startup
|
2025-02-02 13:29:12 +01:00
|
|
|
|
*/
|
2021-11-27 12:29:26 +01:00
|
|
|
|
#define AUTOSTART
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
|
|
|
|
* @def BLINK(vpin,onDuty,offDuty)
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief Starts a blinking process for a vpin (typically a LED)
|
|
|
|
|
* Stop blink with SET or RESET.
|
2025-02-06 21:00:28 +01:00
|
|
|
|
* @param vpin Pin to blink
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @param onDuty Milliseconds with LED ON
|
|
|
|
|
* @param offDuty Milliseconds with LED off
|
2025-02-02 13:29:12 +01:00
|
|
|
|
*/
|
2024-04-09 21:45:28 +02:00
|
|
|
|
#define BLINK(vpin,onDuty,offDuty)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
|
|
|
|
* @def BROADCAST(msg)
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief Send raw message text to all throttles using the DCC-EX protocol
|
|
|
|
|
* @see WITHROTTLE
|
|
|
|
|
* @param msg Quoted message
|
2025-02-02 13:29:12 +01:00
|
|
|
|
*/
|
2022-03-07 17:30:47 +01:00
|
|
|
|
#define BROADCAST(msg)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
2025-02-06 21:00:28 +01:00
|
|
|
|
* @def CALL(sequence_id)
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief transfer control to another sequence with expectation to return
|
|
|
|
|
* @see RETURN
|
2025-02-06 21:00:28 +01:00
|
|
|
|
* @param sequence_id SEQUENCE to jump processing to, must terminate or RETURN
|
2025-02-02 17:25:28 +01:00
|
|
|
|
*
|
2025-02-02 13:29:12 +01:00
|
|
|
|
*/
|
2025-02-06 21:00:28 +01:00
|
|
|
|
#define CALL(sequence_id)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
2025-02-06 21:00:28 +01:00
|
|
|
|
* @def CLEAR_STASH(stash_id)
|
|
|
|
|
* @brief Clears loco value stored in stash
|
|
|
|
|
* @param stash_id which stash to clear.
|
2025-02-02 13:29:12 +01:00
|
|
|
|
*/
|
2025-02-06 21:00:28 +01:00
|
|
|
|
#define CLEAR_STASH(stash_id)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
2025-02-06 21:00:28 +01:00
|
|
|
|
* @def CLEAR_ALL_STASH
|
|
|
|
|
* @brief Clears all stashed loco values
|
2025-02-02 13:29:12 +01:00
|
|
|
|
*/
|
2025-02-06 21:00:28 +01:00
|
|
|
|
#define CLEAR_ALL_STASH
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
2025-02-06 21:00:28 +01:00
|
|
|
|
* @def CLOSE(turnout_id)
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief Close turnout by id
|
|
|
|
|
* @see THROW
|
2025-02-06 21:00:28 +01:00
|
|
|
|
* @param turnout_id
|
2025-02-02 13:29:12 +01:00
|
|
|
|
*/
|
2025-02-06 21:00:28 +01:00
|
|
|
|
#define CLOSE(turnout_id)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
|
|
|
|
* @def CONFIGURE_SERVO(vpin,pos1,pos2,profile)
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief setup servo movement parameters for non-turnout
|
|
|
|
|
* @param vpin must refer to a servo capable pin
|
|
|
|
|
* @param pos1 SET position of servo
|
|
|
|
|
* @param pos2 RESET position of servo
|
2025-02-06 21:00:28 +01:00
|
|
|
|
* @param profile Movement profile (Instant, Fast, Medium, Slow, Bounce)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
*/
|
2024-02-09 12:54:53 +01:00
|
|
|
|
#define CONFIGURE_SERVO(vpin,pos1,pos2,profile)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
2025-02-06 21:00:28 +01:00
|
|
|
|
* @def DCC_SIGNAL(signal_id,addr,subaddr)
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief Define a DCC accessory signal with short address
|
2025-02-06 21:00:28 +01:00
|
|
|
|
* @param signal_id Id used for all signal manipulation commands
|
|
|
|
|
* @param addr DCC address
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @param subaddr DCC subaddress
|
2025-02-02 13:29:12 +01:00
|
|
|
|
*/
|
2025-02-06 21:00:28 +01:00
|
|
|
|
#define DCC_SIGNAL(signal_id,addr,subaddr)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
2025-02-06 21:00:28 +01:00
|
|
|
|
* @def DCCX_SIGNAL(signal_id,redAspect,amberAspect,greenAspect)
|
|
|
|
|
* @brief Dfeine advanced DCC accessory signal with aspects
|
|
|
|
|
* @param signal_id DCC Linear address AND Id used for all signal manipulation commands
|
2025-02-02 13:29:12 +01:00
|
|
|
|
* @param redAspect
|
|
|
|
|
* @param amberAspect
|
|
|
|
|
* @param greenAspect
|
|
|
|
|
*/
|
2025-02-06 21:00:28 +01:00
|
|
|
|
#define DCCX_SIGNAL(signal_id,redAspect,amberAspect,greenAspect)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
2025-02-13 12:27:32 +01:00
|
|
|
|
* @def DCC_TURNTABLE(turntable_id,homeAngle,description...)
|
2025-02-06 21:00:28 +01:00
|
|
|
|
* @brief defines a Turntable device
|
2025-02-13 12:27:32 +01:00
|
|
|
|
* @param turntable_id
|
|
|
|
|
* @param homeAngle the angle of the home position, valid angles are 0 - 3600
|
|
|
|
|
* @param description... Quoted text description of turntable
|
2025-02-02 13:29:12 +01:00
|
|
|
|
*/
|
2025-02-13 12:27:32 +01:00
|
|
|
|
#define DCC_TURNTABLE(turntable_id,home,description...)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
|
|
|
|
* @def DEACTIVATE(addr,subaddr)
|
2025-02-06 21:00:28 +01:00
|
|
|
|
* @brief Sends DCC Deactivate packet (gate on, gate off)
|
|
|
|
|
* @param addr DCC accessory address
|
|
|
|
|
* @param subaddr DCC accessory subaddress
|
2025-02-02 13:29:12 +01:00
|
|
|
|
*/
|
2021-11-27 12:29:26 +01:00
|
|
|
|
#define DEACTIVATE(addr,subaddr)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
|
|
|
|
* @def DEACTIVATEL(addr)
|
2025-02-06 21:00:28 +01:00
|
|
|
|
* @brief Sends DCC Deactivate packet (gate on, gate off)
|
|
|
|
|
* @param addr DCC Linear accessory address
|
2025-02-02 13:29:12 +01:00
|
|
|
|
*/
|
2021-11-27 12:29:26 +01:00
|
|
|
|
#define DEACTIVATEL(addr)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
2025-02-06 21:00:28 +01:00
|
|
|
|
* @def DELAY(delay_mS)
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief Waits for given milliseconds delay (This is not blocking)
|
2025-02-06 21:00:28 +01:00
|
|
|
|
* @param delay_mS Delay time in milliseconds
|
2025-02-02 13:29:12 +01:00
|
|
|
|
*/
|
2025-02-06 21:00:28 +01:00
|
|
|
|
#define DELAY(delay_ms)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
2025-02-06 21:00:28 +01:00
|
|
|
|
* @def DELAYMINS(delay_minutes)
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief Waits for given minutes delay (This is not blocking)
|
2025-02-06 21:00:28 +01:00
|
|
|
|
* @param delay_minutes
|
2025-02-02 13:29:12 +01:00
|
|
|
|
*/
|
2025-02-06 21:00:28 +01:00
|
|
|
|
#define DELAYMINS(delay_minutes)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
|
|
|
|
* @def DELAYRANDOM(mindelay,maxdelay)
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief Waits for random delay between min and max milliseconds (This is not blocking)
|
2025-02-06 21:00:28 +01:00
|
|
|
|
* @param mindelay minumum delay in mS
|
|
|
|
|
* @param maxdelay maximum delay in mS
|
2025-02-02 13:29:12 +01:00
|
|
|
|
*/
|
2021-11-27 12:29:26 +01:00
|
|
|
|
#define DELAYRANDOM(mindelay,maxdelay)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
|
|
|
|
* @def DONE
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief Stops task loco (if any) and terminates current task
|
2025-02-02 13:29:12 +01:00
|
|
|
|
*/
|
2021-11-27 12:29:26 +01:00
|
|
|
|
#define DONE
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
|
|
|
|
* @def DRIVE(analogpin)
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief RESERVED do not use
|
2025-02-02 13:29:12 +01:00
|
|
|
|
* @param analogpin
|
|
|
|
|
*/
|
2021-11-27 12:29:26 +01:00
|
|
|
|
#define DRIVE(analogpin)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
|
|
|
|
* @def ELSE
|
2025-02-06 21:00:28 +01:00
|
|
|
|
* @brief introduces alternate processing path after any kind of IF
|
|
|
|
|
* @see IF
|
2025-02-02 13:29:12 +01:00
|
|
|
|
*/
|
2022-01-02 20:41:57 +01:00
|
|
|
|
#define ELSE
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
|
|
|
|
* @def ENDIF
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief determines end of IF(any type) block.
|
2025-02-06 21:00:28 +01:00
|
|
|
|
* @see IF
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* IF something ENDIF, or
|
|
|
|
|
* IF something ELSE something ENDIF
|
2025-02-02 13:29:12 +01:00
|
|
|
|
*/
|
2021-11-27 12:29:26 +01:00
|
|
|
|
#define ENDIF
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
|
|
|
|
* @def ENDTASK
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief same as DONE
|
|
|
|
|
* @see DONE
|
2025-02-02 13:29:12 +01:00
|
|
|
|
*/
|
2021-11-27 12:29:26 +01:00
|
|
|
|
#define ENDTASK
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
|
|
|
|
* @def ESTOP
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief Performs emergency stop on current task loco
|
2025-02-02 13:29:12 +01:00
|
|
|
|
*/
|
2021-11-27 12:29:26 +01:00
|
|
|
|
#define ESTOP
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
2025-02-13 12:27:32 +01:00
|
|
|
|
* @def EXTT_TURNTABLE(turntable_id,vpin,homeAngle,description...)
|
|
|
|
|
* @brief This statement will create the EX‑Turntable turntable/traverser object only, so you will need a separate HAL() statement for an EX‑Turntable device driver.
|
|
|
|
|
* @param turntable_id
|
2025-02-02 13:29:12 +01:00
|
|
|
|
* @param vpin
|
2025-02-13 12:27:32 +01:00
|
|
|
|
* @param homeAngle the angle of the home position, valid angles are 0 - 3600
|
2025-02-02 13:29:12 +01:00
|
|
|
|
* @param description...
|
|
|
|
|
*/
|
2024-11-11 02:06:56 +01:00
|
|
|
|
#define EXTT_TURNTABLE(id,vpin,home,description...)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
2025-02-06 21:00:28 +01:00
|
|
|
|
* @def FADE(vpin,value,ms)
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief Modifies analog value slowly taking a given time
|
2025-02-06 21:00:28 +01:00
|
|
|
|
* @param vpin Servo virtual pin number
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @param value new target value
|
|
|
|
|
* @param ms time to reach value
|
2025-02-02 13:29:12 +01:00
|
|
|
|
*/
|
2025-02-06 21:00:28 +01:00
|
|
|
|
#define FADE(vpin,value,ms)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
|
|
|
|
* @def FOFF(func)
|
2025-02-06 21:00:28 +01:00
|
|
|
|
* @brief Turns off current loco function
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @see FON
|
2025-02-02 13:29:12 +01:00
|
|
|
|
* @param func
|
|
|
|
|
*/
|
2021-11-27 12:29:26 +01:00
|
|
|
|
#define FOFF(func)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
2025-02-06 21:00:28 +01:00
|
|
|
|
* @def FOLLOW(sequence_id)
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief Task processing follows given route or sequence (Effectively a GoTo)
|
2025-02-06 21:00:28 +01:00
|
|
|
|
* @param sequence_id
|
2025-02-02 13:29:12 +01:00
|
|
|
|
*/
|
2025-02-06 21:00:28 +01:00
|
|
|
|
#define FOLLOW(sequence_id)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
|
|
|
|
* @def FON(func)
|
2025-02-06 21:00:28 +01:00
|
|
|
|
* @brief Turn on current loco function
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @see FOFF
|
2025-02-02 13:29:12 +01:00
|
|
|
|
* @param func
|
|
|
|
|
*/
|
2022-03-24 11:40:49 +01:00
|
|
|
|
#define FON(func)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
|
|
|
|
* @def FORGET
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief Removes current loco from task and DCC reminders table.
|
2025-02-02 13:29:12 +01:00
|
|
|
|
*/
|
2022-03-24 11:40:49 +01:00
|
|
|
|
#define FORGET
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
2025-02-06 21:00:28 +01:00
|
|
|
|
* @def FREE(token_id)
|
|
|
|
|
* @brief Frees logical token
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @see RESERVE
|
2025-02-06 21:00:28 +01:00
|
|
|
|
* @param token_id 0..255
|
2025-02-02 13:29:12 +01:00
|
|
|
|
*/
|
2025-02-06 21:00:28 +01:00
|
|
|
|
#define FREE(token_id)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
|
|
|
|
* @def FTOGGLE(func)
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief Toggles function for current loco
|
2025-02-02 13:29:12 +01:00
|
|
|
|
* @param func
|
|
|
|
|
*/
|
2024-04-09 21:45:28 +02:00
|
|
|
|
#define FTOGGLE(func)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
|
|
|
|
* @def FWD(speed)
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief Instructs current loco to set DCC speed
|
|
|
|
|
* @param speed 0..127 (1=ESTOP)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
*/
|
2021-11-27 12:29:26 +01:00
|
|
|
|
#define FWD(speed)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
|
|
|
|
* @def GREEN(signal_id)
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief Sets signal to green state
|
2025-02-02 13:29:12 +01:00
|
|
|
|
* @param signal_id
|
|
|
|
|
*/
|
2021-11-27 12:29:26 +01:00
|
|
|
|
#define GREEN(signal_id)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
|
|
|
|
* @def HAL(haltype,params...)
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief Defines VPIN mapping for specific hardware drivers
|
|
|
|
|
* @param haltype driver name, normally device type
|
2025-02-06 21:00:28 +01:00
|
|
|
|
* @param params... depend on driver.
|
2025-02-02 13:29:12 +01:00
|
|
|
|
*/
|
2022-06-15 12:44:46 +02:00
|
|
|
|
#define HAL(haltype,params...)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
|
|
|
|
* @def HAL_IGNORE_DEFAULTS
|
2025-02-06 21:00:28 +01:00
|
|
|
|
* @brief System will ignore default HAL device mappings
|
2025-02-02 13:29:12 +01:00
|
|
|
|
*/
|
2024-01-14 21:20:22 +01:00
|
|
|
|
#define HAL_IGNORE_DEFAULTS
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
2025-02-06 21:00:28 +01:00
|
|
|
|
* @def IF(vpin)
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief Checks sensor state, If false jumps to matching nested ELSE or ENDIF
|
2025-02-06 21:00:28 +01:00
|
|
|
|
* @param vpin VPIN of sensor. Negative VPIN will invert sensor state.
|
2025-02-02 13:29:12 +01:00
|
|
|
|
*/
|
2025-02-06 21:00:28 +01:00
|
|
|
|
#define IF(vpin)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
|
|
|
|
* @def IFAMBER(signal_id)
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief Checks if signal is in AMBER state.
|
|
|
|
|
* @see IF
|
2025-02-02 13:29:12 +01:00
|
|
|
|
* @param signal_id
|
|
|
|
|
*/
|
2022-04-17 10:58:32 +02:00
|
|
|
|
#define IFAMBER(signal_id)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
|
|
|
|
* @def IFCLOSED(turnout_id)
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief Checks if given turnout is in close state
|
|
|
|
|
* @see IF
|
2025-02-02 13:29:12 +01:00
|
|
|
|
* @param turnout_id
|
|
|
|
|
*/
|
2021-12-29 12:15:31 +01:00
|
|
|
|
#define IFCLOSED(turnout_id)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
|
|
|
|
* @def IFGREEN(signal_id)
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief Checks if given signal is in GREEN state
|
|
|
|
|
* @see IF
|
2025-02-02 13:29:12 +01:00
|
|
|
|
* @param signal_id
|
|
|
|
|
*/
|
2022-04-17 10:58:32 +02:00
|
|
|
|
#define IFGREEN(signal_id)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
2025-02-06 21:00:28 +01:00
|
|
|
|
* @def IFGTE(vpin,value)
|
|
|
|
|
* @brief Checks if analog vpin sensor >= value
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @see IF
|
2025-02-06 21:00:28 +01:00
|
|
|
|
* @param vpin
|
2025-02-02 13:29:12 +01:00
|
|
|
|
* @param value
|
|
|
|
|
*/
|
2025-02-06 21:00:28 +01:00
|
|
|
|
#define IFGTE(vpin,value)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
|
|
|
|
* @def IFLOCO(loco_id)
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief Checks if current task loco = loco_id
|
|
|
|
|
* @see IF
|
2025-02-02 13:29:12 +01:00
|
|
|
|
* @param loco_id
|
|
|
|
|
*/
|
2023-01-26 16:55:58 +01:00
|
|
|
|
#define IFLOCO(loco_id)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
|
|
|
|
* @def IFLT(sensor_id,value)
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief Checks if analog sensor < value
|
|
|
|
|
* @see IF
|
2025-02-06 21:00:28 +01:00
|
|
|
|
* @param vpin Analog vpin of sensor
|
2025-02-02 13:29:12 +01:00
|
|
|
|
* @param value
|
|
|
|
|
*/
|
2025-02-06 21:00:28 +01:00
|
|
|
|
#define IFLT(vpin,value)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
2025-02-06 21:00:28 +01:00
|
|
|
|
* @def IFNOT(vpin)
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief Inverse of IF
|
|
|
|
|
* @see IF
|
2025-02-06 21:00:28 +01:00
|
|
|
|
* @param vpin
|
2025-02-02 13:29:12 +01:00
|
|
|
|
*/
|
2025-02-06 21:00:28 +01:00
|
|
|
|
#define IFNOT(vpin)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
|
|
|
|
* @def IFRANDOM(percent)
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief randomly satisfield IF at given percent probability
|
|
|
|
|
* @see IF
|
2025-02-02 13:29:12 +01:00
|
|
|
|
* @param percent
|
|
|
|
|
*/
|
2021-12-29 12:15:31 +01:00
|
|
|
|
#define IFRANDOM(percent)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
|
|
|
|
* @def IFRED(signal_id)
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief Checks if given signal is in RED state
|
|
|
|
|
* @see IF
|
2025-02-02 13:29:12 +01:00
|
|
|
|
* @param signal_id
|
|
|
|
|
*/
|
2022-04-17 10:58:32 +02:00
|
|
|
|
#define IFRED(signal_id)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
|
|
|
|
* @def IFTHROWN(turnout_id)
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief Checks if given turnout is in THROWN state
|
|
|
|
|
* @see IF
|
2025-02-02 13:29:12 +01:00
|
|
|
|
* @param turnout_id
|
|
|
|
|
*/
|
2021-12-29 12:15:31 +01:00
|
|
|
|
#define IFTHROWN(turnout_id)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
2025-02-06 21:00:28 +01:00
|
|
|
|
* @def IFRESERVE(token_id)
|
|
|
|
|
* @brief Attempts to reserve token and if satisfiled the token remains reserved.
|
|
|
|
|
* @see IF RESERVE FREE
|
|
|
|
|
* @param token_id
|
2025-02-02 13:29:12 +01:00
|
|
|
|
*/
|
2025-02-06 21:00:28 +01:00
|
|
|
|
#define IFRESERVE(token_id)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
|
|
|
|
* @def IFTIMEOUT
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief Checks TIMEOUT state after an AT/AFTER request with timeout value.
|
2025-02-06 21:00:28 +01:00
|
|
|
|
* @see IF AT AFTER
|
2025-02-02 13:29:12 +01:00
|
|
|
|
*/
|
2022-01-03 11:15:10 +01:00
|
|
|
|
#define IFTIMEOUT
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
|
|
|
|
* @def IFTTPOSITION(turntable_id,position)
|
2025-02-06 21:00:28 +01:00
|
|
|
|
* @brief Checks if Turntable is in given position
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @see IF
|
2025-02-02 13:29:12 +01:00
|
|
|
|
* @param turntable_id
|
|
|
|
|
* @param position
|
|
|
|
|
*/
|
2023-09-02 00:29:49 +02:00
|
|
|
|
#define IFTTPOSITION(turntable_id,position)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
2025-02-13 12:27:32 +01:00
|
|
|
|
* @def IFRE(vpin,value)
|
|
|
|
|
* @brief Checks external rotary encoder value
|
|
|
|
|
* @param vpin of device driver for rotary encoder
|
2025-02-02 13:29:12 +01:00
|
|
|
|
* @param value
|
|
|
|
|
*/
|
2025-02-13 12:27:32 +01:00
|
|
|
|
#define IFRE(vpin,value)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
|
|
|
|
* @def INVERT_DIRECTION
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief Marks current task so that FWD and REV commands are inverted.
|
2025-02-02 13:29:12 +01:00
|
|
|
|
*/
|
2021-11-27 12:29:26 +01:00
|
|
|
|
#define INVERT_DIRECTION
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
|
|
|
|
* @def JMRI_SENSOR(vpin,count...)
|
2025-02-11 21:04:38 +01:00
|
|
|
|
* @brief Defines multiple JMRI <s> type sensor feedback definitions each with id matching vpin
|
2025-02-06 21:00:28 +01:00
|
|
|
|
* @param vpin first vpin number
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @param count... Number of consecutine VPINS for which to create JMRI sensor feedbacks. Default 1.
|
2025-02-02 13:29:12 +01:00
|
|
|
|
*/
|
2024-02-07 23:11:27 +01:00
|
|
|
|
#define JMRI_SENSOR(vpin,count...)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
|
|
|
|
* @def JOIN
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief Switches PROG track to receive MAIN track DCC packets. (Drive on PROG track)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
*/
|
2021-11-27 12:29:26 +01:00
|
|
|
|
#define JOIN
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
|
|
|
|
* @def KILLALL
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief Tertminates all running EXRAIL tasks
|
2025-02-02 13:29:12 +01:00
|
|
|
|
*/
|
2022-03-31 22:52:43 +02:00
|
|
|
|
#define KILLALL
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
2025-02-06 21:00:28 +01:00
|
|
|
|
* @def LATCH(vpin)
|
|
|
|
|
* @brief Make all AT/AFTER/IF see vpin as HIGH without checking hardware
|
|
|
|
|
* @param vpin Must only be for VPINS 0..255
|
2025-02-02 13:29:12 +01:00
|
|
|
|
*/
|
2025-02-06 21:00:28 +01:00
|
|
|
|
#define LATCH(vpin)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
|
|
|
|
* @def LCC(eventid)
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief Issue event to LCC
|
2025-02-02 13:29:12 +01:00
|
|
|
|
* @param eventid
|
|
|
|
|
*/
|
2023-10-13 14:59:06 +02:00
|
|
|
|
#define LCC(eventid)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
|
|
|
|
* @def LCCX(senderid,eventid)
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief Issue LCC event while impersonating another sender
|
2025-02-02 13:29:12 +01:00
|
|
|
|
* @param senderid
|
|
|
|
|
* @param eventid
|
|
|
|
|
*/
|
2023-10-13 14:59:06 +02:00
|
|
|
|
#define LCCX(senderid,eventid)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
|
|
|
|
* @def LCD(row,msg)
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief Write message on row of default configured LCD/OLED
|
|
|
|
|
* @see SCREEN
|
2025-02-02 13:29:12 +01:00
|
|
|
|
* @param row
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @param msg Quoted text
|
2025-02-02 13:29:12 +01:00
|
|
|
|
*/
|
2023-02-11 16:47:50 +01:00
|
|
|
|
#define LCD(row,msg)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
|
|
|
|
* @def SCREEN(display,row,msg)
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief Send message to external display hadlers
|
|
|
|
|
* @param display number, 0=local display, others are handled by external
|
|
|
|
|
* displays which may have different display numbers on different devices.
|
2025-02-02 13:29:12 +01:00
|
|
|
|
* @param row
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @param msg Quoted text
|
2025-02-02 13:29:12 +01:00
|
|
|
|
*/
|
2023-02-12 00:37:09 +01:00
|
|
|
|
#define SCREEN(display,row,msg)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
|
|
|
|
* @def LCN(msg)
|
2025-02-11 21:04:38 +01:00
|
|
|
|
* @brief Reserved for LCN communication. Refer to their documentation.
|
2025-02-02 13:29:12 +01:00
|
|
|
|
* @param msg
|
|
|
|
|
*/
|
2021-11-27 12:29:26 +01:00
|
|
|
|
#define LCN(msg)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
|
|
|
|
* @def MESSAGE(msg)
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief Send a human readable message to all throttle users
|
|
|
|
|
* @param msg Quoted text
|
2025-02-02 13:29:12 +01:00
|
|
|
|
*/
|
2024-03-08 21:33:11 +01:00
|
|
|
|
#define MESSAGE(msg)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
2025-02-13 12:27:32 +01:00
|
|
|
|
* @def MOVETT(turntable_id,steps,activity)
|
|
|
|
|
* @brief Move Turntable to specific position
|
|
|
|
|
* @see ROTATE
|
|
|
|
|
* @param turntable_id
|
|
|
|
|
* @param steps position to move to
|
|
|
|
|
* @param activity see ROTATE
|
2025-02-02 13:29:12 +01:00
|
|
|
|
*/
|
2025-02-13 12:27:32 +01:00
|
|
|
|
#define MOVETT(turntable_id,steps,activity)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
2025-02-06 21:00:28 +01:00
|
|
|
|
* @def NEOPIXEL(vpin,r,g,b,count...)
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief Set a NEOPIXEL vpin to a given red/green/blue colour
|
2025-02-06 21:00:28 +01:00
|
|
|
|
* @param vpin VPIN of a pixel
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @param r red component 0-255
|
|
|
|
|
* @param g green component 0-255
|
|
|
|
|
* @param b blue component 0-255
|
|
|
|
|
* @param count... Number of consecutive pixels to set, Default 1.
|
2025-02-02 13:29:12 +01:00
|
|
|
|
*/
|
2025-02-06 21:00:28 +01:00
|
|
|
|
#define NEOPIXEL(vpin,r,g,b,count...)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
2025-02-06 21:00:28 +01:00
|
|
|
|
* @def NEOPIXEL_SIGNAL(signal_id,redcolour,ambercolour,greencolour)
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief Define a signal that uses a single multi colour pixel
|
2025-02-06 21:00:28 +01:00
|
|
|
|
* @see NEORGB
|
|
|
|
|
* @param vpin unique signal_id
|
|
|
|
|
* @param redcolour RGB colour use NEORGB(red,green,blue) to create values.
|
2025-02-02 13:29:12 +01:00
|
|
|
|
* @param ambercolour
|
|
|
|
|
* @param greencolour
|
|
|
|
|
*/
|
2025-02-06 21:00:28 +01:00
|
|
|
|
#define NEOPIXEL_SIGNAL(vpin,redcolour,ambercolour,greencolour)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
|
|
|
|
* @def ACON(eventid)
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief Send MERG CBUS ACON to Adapter
|
2025-02-02 13:29:12 +01:00
|
|
|
|
* @param eventid
|
|
|
|
|
*/
|
2024-06-13 14:01:33 +02:00
|
|
|
|
#define ACON(eventid)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
|
|
|
|
* @def ACOF(eventid)
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief Send MERG CBUS ACOF to Adapter
|
2025-02-02 13:29:12 +01:00
|
|
|
|
* @param eventid
|
|
|
|
|
*/
|
2024-06-13 14:01:33 +02:00
|
|
|
|
#define ACOF(eventid)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
|
|
|
|
* @def ONACON(eventid)
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief Start task here when ACON for event receied from MERG CBUS
|
2025-02-02 13:29:12 +01:00
|
|
|
|
* @param eventid
|
|
|
|
|
*/
|
2024-06-13 14:01:33 +02:00
|
|
|
|
#define ONACON(eventid)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
|
|
|
|
* @def ONACOF(eventid)
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief Start task here when ACOF for event receied from MERG CBUS
|
2025-02-02 13:29:12 +01:00
|
|
|
|
* @param eventid
|
|
|
|
|
*/
|
2024-06-13 14:01:33 +02:00
|
|
|
|
#define ONACOF(eventid)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
|
|
|
|
* @def ONACTIVATE(addr,subaddr)
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief Start task here when DCC Activate sent for short address
|
2025-02-02 13:29:12 +01:00
|
|
|
|
* @param addr
|
|
|
|
|
* @param subaddr
|
|
|
|
|
*/
|
2021-11-27 12:29:26 +01:00
|
|
|
|
#define ONACTIVATE(addr,subaddr)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
|
|
|
|
* @def ONACTIVATEL(linear)
|
2025-02-11 21:04:38 +01:00
|
|
|
|
* @brief Start task here when DCC Activate sent for linear address
|
2025-02-02 13:29:12 +01:00
|
|
|
|
* @param linear
|
|
|
|
|
*/
|
2021-11-27 12:29:26 +01:00
|
|
|
|
#define ONACTIVATEL(linear)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
|
|
|
|
* @def ONAMBER(signal_id)
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief Start task here when signal set to AMBER state
|
2025-02-02 13:29:12 +01:00
|
|
|
|
* @param signal_id
|
|
|
|
|
*/
|
2022-06-17 12:48:37 +02:00
|
|
|
|
#define ONAMBER(signal_id)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
2025-02-06 21:00:28 +01:00
|
|
|
|
* @def ONTIME(minute_in_day)
|
|
|
|
|
* @brief Start task here when fastclock matches
|
2025-02-11 21:04:38 +01:00
|
|
|
|
* @param minute_in_day (0..1439)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
*/
|
2025-02-06 21:00:28 +01:00
|
|
|
|
#define ONTIME(minute_in_day)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
|
|
|
|
* @def ONCLOCKTIME(hours,mins)
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief Start task here when fastclock matches time
|
2025-02-02 13:29:12 +01:00
|
|
|
|
* @param hours
|
|
|
|
|
* @param mins
|
|
|
|
|
*/
|
2023-01-11 18:36:11 +01:00
|
|
|
|
#define ONCLOCKTIME(hours,mins)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
|
|
|
|
* @def ONCLOCKMINS(mins)
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief Start task here hourly when fastclock minutes matches
|
2025-02-02 13:29:12 +01:00
|
|
|
|
* @param mins
|
|
|
|
|
*/
|
2023-04-12 13:07:08 +02:00
|
|
|
|
#define ONCLOCKMINS(mins)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
|
|
|
|
* @def ONOVERLOAD(track_id)
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief Start task here when given track goes into overload
|
|
|
|
|
* @param track_id A..H
|
2025-02-02 13:29:12 +01:00
|
|
|
|
*/
|
2023-08-12 19:40:48 +02:00
|
|
|
|
#define ONOVERLOAD(track_id)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
|
|
|
|
* @def ONDEACTIVATE(addr,subaddr)
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief Start task here when DCC deactivate packet sent
|
2025-02-02 13:29:12 +01:00
|
|
|
|
* @param addr
|
|
|
|
|
* @param subaddr
|
|
|
|
|
*/
|
2021-11-27 12:29:26 +01:00
|
|
|
|
#define ONDEACTIVATE(addr,subaddr)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
|
|
|
|
* @def ONDEACTIVATEL(linear)
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief Start task here when DCC deactivate sent to linear address
|
2025-02-02 13:29:12 +01:00
|
|
|
|
* @param linear
|
|
|
|
|
*/
|
2021-11-27 12:29:26 +01:00
|
|
|
|
#define ONDEACTIVATEL(linear)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
|
|
|
|
* @def ONCLOSE(turnout_id)
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief Start task here when turnout closed
|
2025-02-02 13:29:12 +01:00
|
|
|
|
* @param turnout_id
|
|
|
|
|
*/
|
2021-11-27 12:29:26 +01:00
|
|
|
|
#define ONCLOSE(turnout_id)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
|
|
|
|
* @def ONLCC(sender,event)
|
2025-02-11 21:04:38 +01:00
|
|
|
|
* @brief Start task here when LCC event arrives from sender
|
2025-02-02 13:29:12 +01:00
|
|
|
|
* @param sender
|
|
|
|
|
* @param event
|
|
|
|
|
*/
|
2023-10-13 14:59:06 +02:00
|
|
|
|
#define ONLCC(sender,event)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
|
|
|
|
* @def ONGREEN(signal_id)
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief Start task here when signal set to GREEN state
|
2025-02-02 13:29:12 +01:00
|
|
|
|
* @param signal_id
|
|
|
|
|
*/
|
2022-06-17 12:48:37 +02:00
|
|
|
|
#define ONGREEN(signal_id)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
|
|
|
|
* @def ONRED(signal_id)
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief Start task here when signal set to RED state
|
2025-02-02 13:29:12 +01:00
|
|
|
|
* @param signal_id
|
|
|
|
|
*/
|
2023-09-02 00:29:49 +02:00
|
|
|
|
#define ONRED(signal_id)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
|
|
|
|
* @def ONROTATE(turntable_id)
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief Start task here when turntable is rotated
|
2025-02-02 13:29:12 +01:00
|
|
|
|
* @param turntable_id
|
|
|
|
|
*/
|
2023-09-02 00:29:49 +02:00
|
|
|
|
#define ONROTATE(turntable_id)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
|
|
|
|
* @def ONTHROW(turnout_id)
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief Start task here when turnout is Thrown
|
2025-02-02 13:29:12 +01:00
|
|
|
|
* @param turnout_id
|
|
|
|
|
*/
|
2021-11-27 12:29:26 +01:00
|
|
|
|
#define ONTHROW(turnout_id)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
2025-02-11 21:04:38 +01:00
|
|
|
|
* @def ONCHANGE(vpin)
|
2025-02-13 12:27:32 +01:00
|
|
|
|
* @brief Toratry encoder change starts task here (This is obscurely different from ONSENSOR which will be merged in a later release.)
|
2025-02-11 21:04:38 +01:00
|
|
|
|
* @param vpin
|
2025-02-02 13:29:12 +01:00
|
|
|
|
*/
|
2025-02-13 12:27:32 +01:00
|
|
|
|
#define ONCHANGE(vpin)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
2025-02-13 12:27:32 +01:00
|
|
|
|
* @def ONSENSOR(vpin)
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief Start task here when sensor changes state (debounced)
|
2025-02-13 12:27:32 +01:00
|
|
|
|
* @param vpin
|
2025-02-02 13:29:12 +01:00
|
|
|
|
*/
|
2025-02-13 12:27:32 +01:00
|
|
|
|
#define ONSENSOR(vpin)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
2025-02-13 12:27:32 +01:00
|
|
|
|
* @def ONBUTTON(vpin)
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief Start task here when sensor changes HIGH to LOW.
|
2025-02-13 12:27:32 +01:00
|
|
|
|
* @param vpin
|
2025-02-02 13:29:12 +01:00
|
|
|
|
*/
|
2025-02-13 12:27:32 +01:00
|
|
|
|
#define ONBUTTON(vpin)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
|
|
|
|
* @def PAUSE
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief Pauses all EXRAIL tasks except the curremnt one.
|
|
|
|
|
* Other tasks ESTOP their locos until RESUME issued
|
2025-02-02 13:29:12 +01:00
|
|
|
|
*/
|
2021-11-27 12:29:26 +01:00
|
|
|
|
#define PAUSE
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
2025-02-13 12:27:32 +01:00
|
|
|
|
* @def PIN_TURNOUT(turnout_id,vpin,description...)
|
2025-02-11 21:04:38 +01:00
|
|
|
|
* @brief Defines a turnout which operates on a signle pin
|
2025-02-13 12:27:32 +01:00
|
|
|
|
* @param turnout_id
|
|
|
|
|
* @param vpin
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @param description... Quoted text (shown to throttles) or HIDDEN
|
|
|
|
|
|
2025-02-02 13:29:12 +01:00
|
|
|
|
*/
|
2025-02-11 21:04:38 +01:00
|
|
|
|
#define PIN_TURNOUT(id,vpin,description...)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
|
|
|
|
* @def PRINT(msg)
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief prints diagnostic message on USB serial
|
|
|
|
|
* @param msg Quoted text
|
2025-02-02 13:29:12 +01:00
|
|
|
|
*/
|
2021-11-27 12:29:26 +01:00
|
|
|
|
#define PRINT(msg)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
|
|
|
|
* @def PARSE(msg)
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief Executes <> command as if entered from serial
|
|
|
|
|
* @param msg Quoted text, preferably including <>
|
2025-02-02 13:29:12 +01:00
|
|
|
|
*/
|
2022-03-31 23:04:40 +02:00
|
|
|
|
#define PARSE(msg)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
2025-02-13 12:27:32 +01:00
|
|
|
|
* @def PICKUP_STASH(stash_id)
|
|
|
|
|
* @see STASH
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief Loads stashed value into current task loco
|
2025-02-13 12:27:32 +01:00
|
|
|
|
* @param stash_id position in stash where a loco id was previously saved.
|
2025-02-02 13:29:12 +01:00
|
|
|
|
*/
|
2025-02-13 12:27:32 +01:00
|
|
|
|
#define PICKUP_STASH(stash_id)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
|
|
|
|
* @def POM(cv,value)
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief Write value to cv on current tasks loco (Program on Main)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
* @param cv
|
|
|
|
|
* @param value
|
|
|
|
|
*/
|
2021-11-27 12:29:26 +01:00
|
|
|
|
#define POM(cv,value)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
|
|
|
|
* @def POWEROFF
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief Powers off all tracks
|
2025-02-02 13:29:12 +01:00
|
|
|
|
*/
|
2021-11-27 12:29:26 +01:00
|
|
|
|
#define POWEROFF
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
|
|
|
|
* @def POWERON
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief Powers ON all tracks
|
2025-02-02 13:29:12 +01:00
|
|
|
|
*/
|
2022-02-28 11:38:26 +01:00
|
|
|
|
#define POWERON
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
|
|
|
|
* @def READ_LOCO
|
2025-02-11 21:04:38 +01:00
|
|
|
|
* @brief Reads loco Id from prog track and sets currenmt task loco id.
|
2025-02-02 13:29:12 +01:00
|
|
|
|
*/
|
2021-11-27 12:29:26 +01:00
|
|
|
|
#define READ_LOCO
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
|
|
|
|
* @def RED(signal_id)
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief sets signal to RED state
|
2025-02-02 13:29:12 +01:00
|
|
|
|
* @param signal_id
|
|
|
|
|
*/
|
2021-11-27 12:29:26 +01:00
|
|
|
|
#define RED(signal_id)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
2025-02-11 21:04:38 +01:00
|
|
|
|
* @def RESERVE(token_id)
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief Waits for token for block. If not available immediately, current task loco is stopped.
|
2025-02-11 21:04:38 +01:00
|
|
|
|
* @param token_id
|
2025-02-02 13:29:12 +01:00
|
|
|
|
*/
|
2025-02-11 21:04:38 +01:00
|
|
|
|
#define RESERVE(token_id)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
2025-02-11 21:04:38 +01:00
|
|
|
|
* @def RESET(vpin,count...)
|
|
|
|
|
* @brief Sets output pin LOW
|
|
|
|
|
* @see SET
|
|
|
|
|
* @param vpin
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @param count... Number of consecutive pins, default 1
|
2025-02-02 13:29:12 +01:00
|
|
|
|
*/
|
2025-02-11 21:04:38 +01:00
|
|
|
|
#define RESET(vpin,count...)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
|
|
|
|
* @def RESUME
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief Resumes PAUSEd tasks
|
|
|
|
|
* @see PAUSE
|
2025-02-02 13:29:12 +01:00
|
|
|
|
*/
|
2021-11-27 12:29:26 +01:00
|
|
|
|
#define RESUME
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
|
|
|
|
* @def RETURN
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief Returns to CALL
|
|
|
|
|
* @see CALL
|
2025-02-02 13:29:12 +01:00
|
|
|
|
*/
|
2021-11-27 12:29:26 +01:00
|
|
|
|
#define RETURN
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
|
|
|
|
* @def REV(speed)
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief Issues DCC speed packet for current loco in reverse.
|
|
|
|
|
* @see FWD
|
|
|
|
|
* @param speed (0..127, 1=ESTOP)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
*/
|
2021-11-27 12:29:26 +01:00
|
|
|
|
#define REV(speed)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
2025-02-13 12:27:32 +01:00
|
|
|
|
* @def ROTATE(turntable_id,position_id,activity)
|
2025-02-14 07:51:04 +01:00
|
|
|
|
* @brief Rotates an EX-Turntable to a given position
|
2025-02-02 13:29:12 +01:00
|
|
|
|
* @param turntable_id
|
2025-02-13 12:27:32 +01:00
|
|
|
|
* @param position_id
|
2025-02-13 23:45:27 +01:00
|
|
|
|
* @param activity
|
|
|
|
|
* - **Turn**: Rotate turntable, maintain phase
|
|
|
|
|
* - **Turn_PInvert**: Rotate turntable, invert phase
|
|
|
|
|
* - **Home**: Initiate homing
|
|
|
|
|
* - **Calibrate**: Initiate calibration sequence
|
|
|
|
|
* - **LED_On**: Turn LED on
|
|
|
|
|
* - **LED_Slow**: Set LED to a slow blink
|
|
|
|
|
* - **LED_Fast**: Set LED to a fast blink
|
|
|
|
|
* - **LED_Off**: Turn LED off
|
|
|
|
|
* - **Acc_On**: Turn accessory pin on
|
|
|
|
|
* - **Acc_Off**: Turn accessory pin off
|
2025-02-02 13:29:12 +01:00
|
|
|
|
*/
|
2023-09-02 00:29:49 +02:00
|
|
|
|
#define ROTATE(turntable_id,position,activity)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
2025-02-13 12:27:32 +01:00
|
|
|
|
* @def ROTATE_DCC(turntable_id,position_id)
|
2025-02-14 07:51:04 +01:00
|
|
|
|
* @brief Rotates turntable to a given position using DCC commands
|
2025-02-02 13:29:12 +01:00
|
|
|
|
* @param turntable_id
|
2025-02-13 12:27:32 +01:00
|
|
|
|
* @param position_id
|
2025-02-02 13:29:12 +01:00
|
|
|
|
*/
|
2025-02-13 12:27:32 +01:00
|
|
|
|
#define ROTATE_DCC(turntable_id,position_id)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
|
|
|
|
* @def ROSTER(cab,name,funcmap...)
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief Describes a loco roster entry visible to throttles
|
|
|
|
|
* @param cab loco DCC address or 0 for default entry
|
|
|
|
|
* @param name Quoted text
|
2025-02-11 21:04:38 +01:00
|
|
|
|
* @param funcmap... Quoted text, optional list of function names separated by / character with momentary function names prefixed with an *.
|
2025-02-02 17:25:28 +01:00
|
|
|
|
*
|
2025-02-02 13:29:12 +01:00
|
|
|
|
*/
|
2021-12-26 19:24:04 +01:00
|
|
|
|
#define ROSTER(cab,name,funcmap...)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
2025-02-11 21:04:38 +01:00
|
|
|
|
* @def ROUTE(sequence_id,description)
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief DEfines starting point of a sequence that will appear as a route on throttle buttons.
|
2025-02-11 21:04:38 +01:00
|
|
|
|
* @param sequence_id
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @param description Quoted text, throttle button capotion.
|
2025-02-02 13:29:12 +01:00
|
|
|
|
*/
|
2025-02-11 21:04:38 +01:00
|
|
|
|
#define ROUTE(sequence_id,description)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
2025-02-11 21:04:38 +01:00
|
|
|
|
* @def ROUTE_ACTIVE(sequence_id)
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief Tells throttle to display the route button as active
|
2025-02-11 21:04:38 +01:00
|
|
|
|
* @param sequence_id of ROUTE/AUTOMATION
|
2025-02-02 13:29:12 +01:00
|
|
|
|
*/
|
2025-02-11 21:04:38 +01:00
|
|
|
|
#define ROUTE_ACTIVE(sequence_id)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
2025-02-11 21:04:38 +01:00
|
|
|
|
* @def ROUTE_INACTIVE(sequence_id)
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief Tells throttle to display the route button as inactive
|
2025-02-11 21:04:38 +01:00
|
|
|
|
* @param sequence_id of ROUTE/AUTOMATION
|
2025-02-02 13:29:12 +01:00
|
|
|
|
*/
|
2025-02-11 21:04:38 +01:00
|
|
|
|
#define ROUTE_INACTIVE(sequence_id)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
2025-02-11 21:04:38 +01:00
|
|
|
|
* @def ROUTE_HIDDEN(sequence_id)
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief Tells throttle to hide the route button
|
2025-02-11 21:04:38 +01:00
|
|
|
|
* @param sequence_id of ROUTE/AUTOMATION
|
2025-02-02 13:29:12 +01:00
|
|
|
|
*/
|
2025-02-11 21:04:38 +01:00
|
|
|
|
#define ROUTE_HIDDEN(sequence_id)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
2025-02-11 21:04:38 +01:00
|
|
|
|
* @def ROUTE_DISABLED(sequence_id)
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief Tells throttle to display the route button as disabled
|
2025-02-11 21:04:38 +01:00
|
|
|
|
* @param sequence_id of ROUTE/AUTOMATION
|
2025-02-02 13:29:12 +01:00
|
|
|
|
*/
|
2025-02-11 21:04:38 +01:00
|
|
|
|
#define ROUTE_DISABLED(sequence_id)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
2025-02-11 21:04:38 +01:00
|
|
|
|
* @def ROUTE_CAPTION(sequence_id,caption)
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief Tells throttle to change thr route button caption
|
2025-02-11 21:04:38 +01:00
|
|
|
|
* @param sequence_id of ROUTE/AUTOMATION
|
2025-02-02 13:29:12 +01:00
|
|
|
|
* @param caption
|
|
|
|
|
*/
|
2025-02-11 21:04:38 +01:00
|
|
|
|
#define ROUTE_CAPTION(sequence_id,caption)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
2025-02-11 21:04:38 +01:00
|
|
|
|
* @def SENDLOCO(cab,sequence_id)
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief Start a new task to drive the loco
|
|
|
|
|
* @param cab loco to be driven
|
2025-02-11 21:04:38 +01:00
|
|
|
|
* @param route sequence_id of route, automation or sequence to drive
|
2025-02-02 13:29:12 +01:00
|
|
|
|
*/
|
2025-02-11 21:04:38 +01:00
|
|
|
|
#define SENDLOCO(cab,sequence_id)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
2025-02-11 21:04:38 +01:00
|
|
|
|
* @def SEQUENCE(sequence_id)
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief Provides a unique label than can be used to call, follow or start.
|
|
|
|
|
* @see CALL
|
|
|
|
|
* @see FOLLOW
|
|
|
|
|
* @see START
|
2025-02-11 21:04:38 +01:00
|
|
|
|
* @param sequence_id
|
2025-02-02 13:29:12 +01:00
|
|
|
|
*/
|
2025-02-11 21:04:38 +01:00
|
|
|
|
#define SEQUENCE(sequence_id)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
|
|
|
|
* @def SERIAL(msg)
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief Write direct to Serial output
|
|
|
|
|
* @param msg Quoted text
|
2025-02-02 13:29:12 +01:00
|
|
|
|
*/
|
2021-11-27 12:29:26 +01:00
|
|
|
|
#define SERIAL(msg)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
|
|
|
|
* @def SERIAL1(msg)
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief Write direct to Serial1 output
|
|
|
|
|
* @param msg Quoted text
|
2025-02-02 13:29:12 +01:00
|
|
|
|
*/
|
2021-11-27 12:29:26 +01:00
|
|
|
|
#define SERIAL1(msg)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
|
|
|
|
* @def SERIAL2(msg)
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief Write direct to Serial2 output
|
|
|
|
|
* @param msg Quoted text
|
2025-02-02 13:29:12 +01:00
|
|
|
|
*/
|
2021-11-27 12:29:26 +01:00
|
|
|
|
#define SERIAL2(msg)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
|
|
|
|
* @def SERIAL3(msg)
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief Write direct to Serial3 output
|
|
|
|
|
* @param msg Quoted text
|
|
|
|
|
*/
|
2021-11-27 12:29:26 +01:00
|
|
|
|
#define SERIAL3(msg)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
|
|
|
|
* @def SERIAL4(msg)
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief Write direct to Serial4 output
|
|
|
|
|
* @param msg Quoted text
|
2025-02-02 13:29:12 +01:00
|
|
|
|
*/
|
2022-12-16 14:14:48 +01:00
|
|
|
|
#define SERIAL4(msg)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
|
|
|
|
* @def SERIAL5(msg)
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief Write direct to Serial5 output
|
|
|
|
|
* @param msg Quoted text
|
2025-02-02 13:29:12 +01:00
|
|
|
|
*/
|
2022-12-16 14:14:48 +01:00
|
|
|
|
#define SERIAL5(msg)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
|
|
|
|
* @def SERIAL6(msg)
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief Write direct to Serial6 output
|
|
|
|
|
* @param msg Quoted text
|
2025-02-02 13:29:12 +01:00
|
|
|
|
*/
|
2022-12-16 14:14:48 +01:00
|
|
|
|
#define SERIAL6(msg)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
2025-02-11 21:04:38 +01:00
|
|
|
|
* @def SERVO(vpin,position,profile)
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief Move servo to given position
|
2025-02-11 21:04:38 +01:00
|
|
|
|
* @param vpin of servo
|
2025-02-13 12:27:32 +01:00
|
|
|
|
* @param position servo position (values are hardware dependent)
|
2025-02-11 21:04:38 +01:00
|
|
|
|
* @param profile movement profile (Instant, Fast, Medium, Slow, Bounce)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
*/
|
2025-02-11 21:04:38 +01:00
|
|
|
|
#define SERVO(vpin,position,profile)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
|
|
|
|
* @def SERVO2(id,position,duration)
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief Move servo to given position taking time
|
2025-02-11 21:04:38 +01:00
|
|
|
|
* @param vpin of servo
|
2025-02-13 12:27:32 +01:00
|
|
|
|
* @param position servo position (values are hardware dependent)
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @param duration mS
|
2025-02-02 13:29:12 +01:00
|
|
|
|
*/
|
2025-02-11 21:04:38 +01:00
|
|
|
|
#define SERVO2(vpin,position,duration)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
|
|
|
|
* @def SERVO_SIGNAL(vpin,redpos,amberpos,greenpos)
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief Dedfine a servo based signal with 3 servo positions
|
2025-02-11 21:04:38 +01:00
|
|
|
|
* @param vpin of servo, acts as signal_id
|
2025-02-13 12:27:32 +01:00
|
|
|
|
* @param redpos servo position (values are hardware dependent)
|
|
|
|
|
* @param amberpos servo position (values are hardware dependent)
|
|
|
|
|
* @param greenpos servo position (values are hardware dependent)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
*/
|
2022-02-06 14:56:51 +01:00
|
|
|
|
#define SERVO_SIGNAL(vpin,redpos,amberpos,greenpos)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
2025-02-11 21:04:38 +01:00
|
|
|
|
* @def SERVO_TURNOUT(turnout_id,vpin,activeAngle,inactiveAngle,profile,description...)
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief Define a servo driven turnout
|
2025-02-11 21:04:38 +01:00
|
|
|
|
* @param turnout_id used by THROW/CLOSE
|
|
|
|
|
* @param vpin for servo
|
2025-02-13 12:27:32 +01:00
|
|
|
|
* @param activeAngle servo position (values are hardware dependent)
|
|
|
|
|
* @param inactiveAngle servo position (values are hardware dependent)
|
2025-02-11 21:04:38 +01:00
|
|
|
|
* @param profile movement profile (Instant, Fast, Medium, Slow, Bounce)
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @param description... Quoted text shown to throttles or HIDDEN keyword to hide turnout button
|
2025-02-02 13:29:12 +01:00
|
|
|
|
*/
|
2025-02-11 21:04:38 +01:00
|
|
|
|
#define SERVO_TURNOUT(turnout_id,vpin,activeAngle,inactiveAngle,profile,description...)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
2025-02-11 21:04:38 +01:00
|
|
|
|
* @def SET(vpin,count...)
|
|
|
|
|
* @brief Set pin HIGH
|
|
|
|
|
* @see RESET
|
|
|
|
|
* @param vpin
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @param count... Number of sequential vpins to set. Default 1.
|
2025-02-02 13:29:12 +01:00
|
|
|
|
*/
|
2025-02-11 21:04:38 +01:00
|
|
|
|
#define SET(vpin,count...)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
|
|
|
|
* @def SET_TRACK(track,mode)
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief Set output track type
|
|
|
|
|
* @param track A..H
|
2025-02-13 12:27:32 +01:00
|
|
|
|
* @param mode NONE, MAIN, PROG, DC, EXT, BOOST, BOOST_INV, BOOST_AUTO, MAIN_INV, MAIN_AUTO, DC_INV, DCX
|
2025-02-02 13:29:12 +01:00
|
|
|
|
*/
|
2022-03-19 17:26:29 +01:00
|
|
|
|
#define SET_TRACK(track,mode)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
|
|
|
|
* @def SET_POWER(track,onoff)
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief Set track power mode
|
|
|
|
|
* @param track A..H
|
2025-02-13 12:27:32 +01:00
|
|
|
|
* @param onoff ON or OFF
|
2025-02-02 13:29:12 +01:00
|
|
|
|
*/
|
2023-09-24 16:40:42 +02:00
|
|
|
|
#define SET_POWER(track,onoff)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
|
|
|
|
* @def SETLOCO(loco)
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief Sets the loco being handled by the current task
|
2025-02-02 13:29:12 +01:00
|
|
|
|
* @param loco
|
|
|
|
|
*/
|
2021-11-27 12:29:26 +01:00
|
|
|
|
#define SETLOCO(loco)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
|
|
|
|
* @def SETFREQ(freq)
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief Sets the DC track PWM frequency
|
2025-02-13 12:27:32 +01:00
|
|
|
|
* @param freq Frequency is default 0, or 1..3
|
2025-02-02 13:29:12 +01:00
|
|
|
|
*/
|
2024-07-10 10:57:03 +02:00
|
|
|
|
#define SETFREQ(freq)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
|
|
|
|
* @def SIGNAL(redpin,amberpin,greenpin)
|
2025-02-13 12:27:32 +01:00
|
|
|
|
* @brief Define a Signal with LOW=on leds
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @see SIGNALH
|
2025-02-11 21:04:38 +01:00
|
|
|
|
* @param redpin vpin for RED state, also acts as signal_id
|
2025-02-02 13:29:12 +01:00
|
|
|
|
* @param amberpin
|
|
|
|
|
* @param greenpin
|
|
|
|
|
*/
|
2021-11-27 12:29:26 +01:00
|
|
|
|
#define SIGNAL(redpin,amberpin,greenpin)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
|
|
|
|
* @def SIGNALH(redpin,amberpin,greenpin)
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief define a signal with HIGH=ON leds
|
2025-02-11 21:04:38 +01:00
|
|
|
|
* @param redpin vpin for RED state, also acts as signal_id
|
2025-02-02 13:29:12 +01:00
|
|
|
|
* @param amberpin
|
|
|
|
|
* @param greenpin
|
|
|
|
|
*/
|
2022-03-18 14:46:07 +01:00
|
|
|
|
#define SIGNALH(redpin,amberpin,greenpin)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
|
|
|
|
* @def SPEED(speed)
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief Changes current tasks loco speed without changing direction
|
|
|
|
|
* @param speed 0..127 (1=ESTOP)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
*/
|
2021-11-27 12:29:26 +01:00
|
|
|
|
#define SPEED(speed)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
2025-02-11 21:04:38 +01:00
|
|
|
|
* @def START(sequence_id)
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief Starts a new task at the given route/animation/sequence
|
2025-02-11 21:04:38 +01:00
|
|
|
|
* @param sequence_id
|
2025-02-02 13:29:12 +01:00
|
|
|
|
*/
|
2025-02-11 21:04:38 +01:00
|
|
|
|
#define START(sequence_id)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
2025-02-11 21:04:38 +01:00
|
|
|
|
* @def STASH(stash_id)
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief saves cuttent tasks loco id in the stash array
|
2025-02-11 21:04:38 +01:00
|
|
|
|
* @param stash_id position in stash array to save loco id
|
2025-02-02 13:29:12 +01:00
|
|
|
|
*/
|
2025-02-11 21:04:38 +01:00
|
|
|
|
#define STASH(stash_id)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
|
|
|
|
* @def STEALTH(code...)
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief Allows for embedding raw C++ code in context of current task.
|
2025-02-11 21:04:38 +01:00
|
|
|
|
* @param code... c++ code to be executed. This requires intimate understanding of the product acrhitecture.
|
2025-02-02 13:29:12 +01:00
|
|
|
|
*/
|
2023-11-30 12:32:39 +01:00
|
|
|
|
#define STEALTH(code...)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
|
|
|
|
* @def STEALTH_GLOBAL(code...)
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief Allows for embedding raw c++ code out of context.
|
2025-02-11 21:04:38 +01:00
|
|
|
|
* @param code... c++ code to be defined. This requires intimate understanding of the product acrhitecture.
|
2025-02-02 13:29:12 +01:00
|
|
|
|
*/
|
2024-04-09 21:45:28 +02:00
|
|
|
|
#define STEALTH_GLOBAL(code...)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
|
|
|
|
* @def STOP
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief Same as SPEED(0)
|
2025-02-11 21:04:38 +01:00
|
|
|
|
* @see SPEED
|
2025-02-02 13:29:12 +01:00
|
|
|
|
*/
|
2021-11-27 12:29:26 +01:00
|
|
|
|
#define STOP
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
2025-02-11 21:04:38 +01:00
|
|
|
|
* @def THROW(turnout_id)
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief Throws given turnout
|
2025-02-11 21:04:38 +01:00
|
|
|
|
* @see CLOSE
|
|
|
|
|
* @param turnout_id
|
2025-02-02 13:29:12 +01:00
|
|
|
|
*/
|
2025-02-11 21:04:38 +01:00
|
|
|
|
#define THROW(turnout_id)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
2025-02-11 21:04:38 +01:00
|
|
|
|
* @def TOGGLE_TURNOUT(turnout_id)
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief Toggles given turnout
|
2025-02-11 21:04:38 +01:00
|
|
|
|
* @param tuirnout_id
|
2025-02-02 13:29:12 +01:00
|
|
|
|
*/
|
2025-02-11 21:04:38 +01:00
|
|
|
|
#define TOGGLE_TURNOUT(turnout_id)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
2025-02-13 12:27:32 +01:00
|
|
|
|
* @def TT_ADDPOSITION(turntable_id,position_id,value,angle,description...)
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief Defines a turntable track position
|
2025-02-02 13:29:12 +01:00
|
|
|
|
* @param turntable_id
|
2025-02-13 12:27:32 +01:00
|
|
|
|
* @param position_id each position is given an id
|
|
|
|
|
* @param address DCC accessory address
|
|
|
|
|
* @param angle Used only for throttles that may draw a visual representation of the turntable
|
|
|
|
|
* @param description... quoted text or HIDDEN
|
2025-02-02 13:29:12 +01:00
|
|
|
|
*/
|
2025-02-13 12:27:32 +01:00
|
|
|
|
#define TT_ADDPOSITION(turntable_id,position_id,value,angle,description...)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
2025-02-11 21:04:38 +01:00
|
|
|
|
* @def TURNOUT(turnout_id,addr,subaddr,description...)
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief Defines a DCC accessory turnout with legacy address
|
2025-02-11 21:04:38 +01:00
|
|
|
|
* @param turnout_id to be used in THROW/CLOSE etc
|
|
|
|
|
* @param addr DCC accessory address
|
|
|
|
|
* @param subaddr DCC accessory subaddress
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @param description... Quoted text or HIDDEN, appears on throttle buttons
|
2025-02-02 13:29:12 +01:00
|
|
|
|
*/
|
2025-02-11 21:04:38 +01:00
|
|
|
|
#define TURNOUT(turnout_id,addr,subaddr,description...)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
2025-02-11 21:04:38 +01:00
|
|
|
|
* @def TURNOUTL(turnout_id,addr,description...)
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief Defines a DCC accessory turnout with inear address
|
2025-02-11 21:04:38 +01:00
|
|
|
|
* @see TURNOUT
|
|
|
|
|
* @param turnout_id to be used in THROW/CLOSE etc
|
|
|
|
|
* @param addr DCC accessory linear address
|
|
|
|
|
* @param description... Quoted text or HIDDEN, appears on throttle buttons
|
2025-02-02 13:29:12 +01:00
|
|
|
|
*/
|
2025-02-11 21:04:38 +01:00
|
|
|
|
#define TURNOUTL(tirnout_id,addr,description...)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
|
|
|
|
* @def UNJOIN
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief Disconnects PROG track from MAIN
|
|
|
|
|
* @see JOIN
|
2025-02-02 13:29:12 +01:00
|
|
|
|
*/
|
2021-11-27 12:29:26 +01:00
|
|
|
|
#define UNJOIN
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
2025-02-11 21:04:38 +01:00
|
|
|
|
* @def UNLATCH(vpin)
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief removes latched on flag
|
|
|
|
|
* @see LATCH
|
2025-02-11 21:04:38 +01:00
|
|
|
|
* @param vpin (limited to 0..255)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
*/
|
2025-02-11 21:04:38 +01:00
|
|
|
|
#define UNLATCH(vpin)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
2025-02-11 21:04:38 +01:00
|
|
|
|
* @def VIRTUAL_SIGNAL(signal_id)
|
2025-02-13 12:27:32 +01:00
|
|
|
|
* @brief Defines a virtual (no hardware) signal, use ONhandlers to simulate hardware
|
|
|
|
|
* @see SIGNAL ONRED ONAMBER ONGREEN
|
2025-02-11 21:04:38 +01:00
|
|
|
|
* @param signal_id
|
2025-02-02 13:29:12 +01:00
|
|
|
|
*/
|
2025-02-11 21:04:38 +01:00
|
|
|
|
#define VIRTUAL_SIGNAL(signal_id)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
2025-02-11 21:04:38 +01:00
|
|
|
|
* @def VIRTUAL_TURNOUT(turnout_id,description...)
|
2025-02-13 12:27:32 +01:00
|
|
|
|
* @brief Defines a virtual (no hardware) turnout, use ONhandlers to simulate hardware
|
|
|
|
|
* @see TURNOUT ONCLOSE ONTHROW
|
2025-02-11 21:04:38 +01:00
|
|
|
|
* @param turnout_id
|
2025-02-13 12:27:32 +01:00
|
|
|
|
* @param description... quoted text or HIDDEN
|
2025-02-02 13:29:12 +01:00
|
|
|
|
*/
|
2022-03-24 12:56:06 +01:00
|
|
|
|
#define VIRTUAL_TURNOUT(id,description...)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
2025-02-11 21:04:38 +01:00
|
|
|
|
* @def WAITFOR(vpin)
|
|
|
|
|
* @brief WAits for completion of servo movement
|
|
|
|
|
* @param vpin
|
2025-02-02 13:29:12 +01:00
|
|
|
|
*/
|
2021-11-27 12:29:26 +01:00
|
|
|
|
#define WAITFOR(pin)
|
2023-09-06 23:58:19 +02:00
|
|
|
|
#ifndef IO_NO_HAL
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
|
|
|
|
* @def WAITFORTT(turntable_id)
|
2025-02-11 21:04:38 +01:00
|
|
|
|
* @brief waits for completion of turntable movement
|
2025-02-02 13:29:12 +01:00
|
|
|
|
* @param turntable_id
|
|
|
|
|
*/
|
2023-09-06 23:58:19 +02:00
|
|
|
|
#define WAITFORTT(turntable_id)
|
|
|
|
|
#endif
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
|
|
|
|
* @def WITHROTTLE(msg)
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief Broadcasts a string in Withrottle protocol format to all throttles using this protocol.
|
2025-02-11 21:04:38 +01:00
|
|
|
|
* @param msg quoted string
|
2025-02-02 13:29:12 +01:00
|
|
|
|
*/
|
2023-05-01 15:25:45 +02:00
|
|
|
|
#define WITHROTTLE(msg)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
|
|
|
|
* @def XFOFF(cab,func)
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief Turns function off for given loco
|
2025-02-02 13:29:12 +01:00
|
|
|
|
* @param cab
|
2025-02-11 21:04:38 +01:00
|
|
|
|
* @param func function number
|
2025-02-02 13:29:12 +01:00
|
|
|
|
*/
|
2021-11-27 12:29:26 +01:00
|
|
|
|
#define XFOFF(cab,func)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
|
|
|
|
* @def XFON(cab,func)
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief Turns function ON for given loco
|
2025-02-02 13:29:12 +01:00
|
|
|
|
* @param cab
|
|
|
|
|
* @param func
|
|
|
|
|
*/
|
2021-11-27 12:29:26 +01:00
|
|
|
|
#define XFON(cab,func)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
|
|
|
|
* @def XFTOGGLE(cab,func)
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief Toggles function state for given loco
|
2025-02-02 13:29:12 +01:00
|
|
|
|
* @param cab
|
|
|
|
|
* @param func
|
|
|
|
|
*/
|
2024-04-09 21:45:28 +02:00
|
|
|
|
#define XFTOGGLE(cab,func)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
|
|
|
|
* @def XFWD(cab,speed)
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief Sends DCC speed to loco in forward direction
|
2025-02-02 13:29:12 +01:00
|
|
|
|
* @param cab
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @param speed (0..127, 1=ESTOP)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
*/
|
2025-01-09 20:40:07 +01:00
|
|
|
|
#define XFWD(cab,speed)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
/**
|
|
|
|
|
* @def XREV(cab,speed)
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @brief Sends DCC speed to loco in reverse direction
|
2025-02-02 13:29:12 +01:00
|
|
|
|
* @param cab
|
2025-02-02 17:25:28 +01:00
|
|
|
|
* @param speed (0..127, 1=ESTOP)
|
2025-02-02 13:29:12 +01:00
|
|
|
|
*/
|
2025-01-09 20:40:07 +01:00
|
|
|
|
#define XREV(cab,speed)
|
2024-04-09 21:45:28 +02:00
|
|
|
|
|
2021-11-27 12:29:26 +01:00
|
|
|
|
#endif
|