2021-11-27 12:29:26 +01:00
|
|
|
/*
|
2023-01-27 17:03:39 +01:00
|
|
|
* © 2020-2022 Chris Harlow. All rights reserved.
|
2023-04-19 20:45:40 +02:00
|
|
|
* © 2022 Colin Murdoch
|
2023-01-27 17:03:39 +01:00
|
|
|
* © 2023 Harald Barth
|
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
|
|
|
|
* along with CommandStation. If not, see <https://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
|
|
|
// 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.
|
|
|
|
|
|
|
|
// Undefine all RMFT macros
|
|
|
|
#undef ACTIVATE
|
|
|
|
#undef ACTIVATEL
|
|
|
|
#undef AFTER
|
|
|
|
#undef ALIAS
|
|
|
|
#undef AMBER
|
2023-02-04 21:56:12 +01:00
|
|
|
#undef ANOUT
|
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
|
2022-03-07 17:30:47 +01:00
|
|
|
#undef BROADCAST
|
2021-11-27 12:29:26 +01:00
|
|
|
#undef CALL
|
|
|
|
#undef CLOSE
|
2022-06-18 13:31:54 +02:00
|
|
|
#undef DCC_SIGNAL
|
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
|
|
|
|
#undef ESTOP
|
|
|
|
#undef EXRAIL
|
|
|
|
#undef FADE
|
|
|
|
#undef FOFF
|
|
|
|
#undef FOLLOW
|
|
|
|
#undef FON
|
2022-03-24 11:40:49 +01:00
|
|
|
#undef FORGET
|
2021-11-27 12:29:26 +01:00
|
|
|
#undef FREE
|
|
|
|
#undef FWD
|
|
|
|
#undef GREEN
|
2022-06-15 12:44:46 +02:00
|
|
|
#undef HAL
|
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
|
2022-12-30 00:46:42 +01:00
|
|
|
#undef IFRE
|
2021-11-27 12:29:26 +01:00
|
|
|
#undef INVERT_DIRECTION
|
|
|
|
#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
|
2021-11-27 12:29:26 +01:00
|
|
|
#undef LCN
|
2022-08-13 22:48:03 +02:00
|
|
|
#undef MOVETT
|
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-01-11 18:36:11 +01:00
|
|
|
#undef ONTIME
|
|
|
|
#undef ONCLOCKTIME
|
2023-04-12 13:07:08 +02:00
|
|
|
#undef ONCLOCKMINS
|
2022-06-17 12:48:37 +02:00
|
|
|
#undef ONGREEN
|
|
|
|
#undef ONRED
|
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
|
|
|
|
#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
|
|
|
|
#undef ROSTER
|
2021-11-27 12:29:26 +01:00
|
|
|
#undef ROUTE
|
|
|
|
#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
|
2021-11-27 12:29:26 +01:00
|
|
|
#undef SETLOCO
|
|
|
|
#undef SIGNAL
|
2022-03-18 14:46:07 +01:00
|
|
|
#undef SIGNALH
|
2021-11-27 12:29:26 +01:00
|
|
|
#undef SPEED
|
|
|
|
#undef START
|
|
|
|
#undef STOP
|
|
|
|
#undef THROW
|
|
|
|
#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-05-01 15:25:45 +02:00
|
|
|
#undef WITHROTTLE
|
2021-11-27 12:29:26 +01:00
|
|
|
#undef XFOFF
|
|
|
|
#undef XFON
|
|
|
|
|
|
|
|
#ifndef RMFT2_UNDEF_ONLY
|
|
|
|
#define ACTIVATE(addr,subaddr)
|
|
|
|
#define ACTIVATEL(addr)
|
|
|
|
#define AFTER(sensor_id)
|
2022-03-21 17:29:35 +01:00
|
|
|
#define ALIAS(name,value...)
|
2021-11-27 12:29:26 +01:00
|
|
|
#define AMBER(signal_id)
|
2023-02-04 21:56:12 +01:00
|
|
|
#define ANOUT(vpin,value,param1,param2)
|
2021-11-27 12:29:26 +01:00
|
|
|
#define AT(sensor_id)
|
2022-03-18 14:46:07 +01:00
|
|
|
#define ATGTE(sensor_id,value)
|
|
|
|
#define ATLT(sensor_id,value)
|
2022-01-03 11:15:10 +01:00
|
|
|
#define ATTIMEOUT(sensor_id,timeout_ms)
|
2022-04-12 19:47:06 +02:00
|
|
|
#define AUTOMATION(id,description)
|
2021-11-27 12:29:26 +01:00
|
|
|
#define AUTOSTART
|
2022-03-07 17:30:47 +01:00
|
|
|
#define BROADCAST(msg)
|
2021-11-27 12:29:26 +01:00
|
|
|
#define CALL(route)
|
|
|
|
#define CLOSE(id)
|
2022-06-18 13:31:54 +02:00
|
|
|
#define DCC_SIGNAL(id,add,subaddr)
|
2021-11-27 12:29:26 +01:00
|
|
|
#define DEACTIVATE(addr,subaddr)
|
|
|
|
#define DEACTIVATEL(addr)
|
|
|
|
#define DELAY(mindelay)
|
|
|
|
#define DELAYMINS(mindelay)
|
|
|
|
#define DELAYRANDOM(mindelay,maxdelay)
|
|
|
|
#define DONE
|
|
|
|
#define DRIVE(analogpin)
|
2022-01-02 20:41:57 +01:00
|
|
|
#define ELSE
|
2021-11-27 12:29:26 +01:00
|
|
|
#define ENDEXRAIL
|
|
|
|
#define ENDIF
|
|
|
|
#define ENDTASK
|
|
|
|
#define ESTOP
|
|
|
|
#define EXRAIL
|
|
|
|
#define FADE(pin,value,ms)
|
|
|
|
#define FOFF(func)
|
|
|
|
#define FOLLOW(route)
|
2022-03-24 11:40:49 +01:00
|
|
|
#define FON(func)
|
|
|
|
#define FORGET
|
2021-11-27 12:29:26 +01:00
|
|
|
#define FREE(blockid)
|
|
|
|
#define FWD(speed)
|
|
|
|
#define GREEN(signal_id)
|
2022-06-15 12:44:46 +02:00
|
|
|
#define HAL(haltype,params...)
|
2021-11-27 12:29:26 +01:00
|
|
|
#define IF(sensor_id)
|
2022-04-17 10:58:32 +02:00
|
|
|
#define IFAMBER(signal_id)
|
2021-12-29 12:15:31 +01:00
|
|
|
#define IFCLOSED(turnout_id)
|
2022-04-17 10:58:32 +02:00
|
|
|
#define IFGREEN(signal_id)
|
2021-11-30 14:52:22 +01:00
|
|
|
#define IFGTE(sensor_id,value)
|
2023-01-26 16:55:58 +01:00
|
|
|
#define IFLOCO(loco_id)
|
2021-11-30 14:52:22 +01:00
|
|
|
#define IFLT(sensor_id,value)
|
2021-11-27 12:29:26 +01:00
|
|
|
#define IFNOT(sensor_id)
|
2021-12-29 12:15:31 +01:00
|
|
|
#define IFRANDOM(percent)
|
2022-04-17 10:58:32 +02:00
|
|
|
#define IFRED(signal_id)
|
2021-12-29 12:15:31 +01:00
|
|
|
#define IFTHROWN(turnout_id)
|
2021-11-27 12:29:26 +01:00
|
|
|
#define IFRESERVE(block)
|
2022-01-03 11:15:10 +01:00
|
|
|
#define IFTIMEOUT
|
2022-12-30 00:46:42 +01:00
|
|
|
#define IFRE(sensor_id,value)
|
2021-11-27 12:29:26 +01:00
|
|
|
#define INVERT_DIRECTION
|
|
|
|
#define JOIN
|
2022-03-31 22:52:43 +02:00
|
|
|
#define KILLALL
|
2021-11-27 12:29:26 +01:00
|
|
|
#define LATCH(sensor_id)
|
2023-02-11 16:47:50 +01:00
|
|
|
#define LCD(row,msg)
|
2023-02-12 00:37:09 +01:00
|
|
|
#define SCREEN(display,row,msg)
|
2021-11-27 12:29:26 +01:00
|
|
|
#define LCN(msg)
|
2022-08-13 22:48:03 +02:00
|
|
|
#define MOVETT(id,steps,activity)
|
2021-11-27 12:29:26 +01:00
|
|
|
#define ONACTIVATE(addr,subaddr)
|
|
|
|
#define ONACTIVATEL(linear)
|
2022-06-17 12:48:37 +02:00
|
|
|
#define ONAMBER(signal_id)
|
2023-01-11 18:36:11 +01:00
|
|
|
#define ONTIME(value)
|
|
|
|
#define ONCLOCKTIME(hours,mins)
|
2023-04-12 13:07:08 +02:00
|
|
|
#define ONCLOCKMINS(mins)
|
2021-11-27 12:29:26 +01:00
|
|
|
#define ONDEACTIVATE(addr,subaddr)
|
|
|
|
#define ONDEACTIVATEL(linear)
|
|
|
|
#define ONCLOSE(turnout_id)
|
2022-06-17 12:48:37 +02:00
|
|
|
#define ONGREEN(signal_id)
|
|
|
|
#define ONRED(signal_id)
|
2021-11-27 12:29:26 +01:00
|
|
|
#define ONTHROW(turnout_id)
|
2022-12-30 00:46:42 +01:00
|
|
|
#define ONCHANGE(sensor_id)
|
2021-11-27 12:29:26 +01:00
|
|
|
#define PAUSE
|
|
|
|
#define PIN_TURNOUT(id,pin,description...)
|
|
|
|
#define PRINT(msg)
|
2022-03-31 23:04:40 +02:00
|
|
|
#define PARSE(msg)
|
2021-11-27 12:29:26 +01:00
|
|
|
#define POM(cv,value)
|
|
|
|
#define POWEROFF
|
2022-02-28 11:38:26 +01:00
|
|
|
#define POWERON
|
2021-11-27 12:29:26 +01:00
|
|
|
#define READ_LOCO
|
|
|
|
#define RED(signal_id)
|
|
|
|
#define RESERVE(blockid)
|
|
|
|
#define RESET(pin)
|
|
|
|
#define RESUME
|
|
|
|
#define RETURN
|
|
|
|
#define REV(speed)
|
2022-04-12 19:47:06 +02:00
|
|
|
#define ROUTE(id,description)
|
2021-12-26 19:24:04 +01:00
|
|
|
#define ROSTER(cab,name,funcmap...)
|
2021-11-27 12:29:26 +01:00
|
|
|
#define SENDLOCO(cab,route)
|
|
|
|
#define SEQUENCE(id)
|
|
|
|
#define SERIAL(msg)
|
|
|
|
#define SERIAL1(msg)
|
|
|
|
#define SERIAL2(msg)
|
|
|
|
#define SERIAL3(msg)
|
2022-12-16 14:14:48 +01:00
|
|
|
#define SERIAL4(msg)
|
|
|
|
#define SERIAL5(msg)
|
|
|
|
#define SERIAL6(msg)
|
2021-11-27 12:29:26 +01:00
|
|
|
#define SERVO(id,position,profile)
|
|
|
|
#define SERVO2(id,position,duration)
|
2022-02-06 14:56:51 +01:00
|
|
|
#define SERVO_SIGNAL(vpin,redpos,amberpos,greenpos)
|
2021-11-27 12:29:26 +01:00
|
|
|
#define SERVO_TURNOUT(id,pin,activeAngle,inactiveAngle,profile,description...)
|
|
|
|
#define SET(pin)
|
2022-03-19 17:26:29 +01:00
|
|
|
#define SET_TRACK(track,mode)
|
2021-11-27 12:29:26 +01:00
|
|
|
#define SETLOCO(loco)
|
|
|
|
#define SIGNAL(redpin,amberpin,greenpin)
|
2022-03-18 14:46:07 +01:00
|
|
|
#define SIGNALH(redpin,amberpin,greenpin)
|
2021-11-27 12:29:26 +01:00
|
|
|
#define SPEED(speed)
|
|
|
|
#define START(route)
|
|
|
|
#define STOP
|
|
|
|
#define THROW(id)
|
|
|
|
#define TURNOUT(id,addr,subaddr,description...)
|
2023-04-08 18:22:39 +02:00
|
|
|
#define TURNOUTL(id,addr,description...)
|
2021-11-27 12:29:26 +01:00
|
|
|
#define UNJOIN
|
|
|
|
#define UNLATCH(sensor_id)
|
2022-06-18 13:31:54 +02:00
|
|
|
#define VIRTUAL_SIGNAL(id)
|
2022-03-24 12:56:06 +01:00
|
|
|
#define VIRTUAL_TURNOUT(id,description...)
|
2021-11-27 12:29:26 +01:00
|
|
|
#define WAITFOR(pin)
|
2023-05-01 15:25:45 +02:00
|
|
|
#define WITHROTTLE(msg)
|
2021-11-27 12:29:26 +01:00
|
|
|
#define XFOFF(cab,func)
|
|
|
|
#define XFON(cab,func)
|
|
|
|
#endif
|