1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2024-11-24 08:36:14 +01:00
CommandStation-EX/EXRAIL2MacroReset.h

330 lines
7.2 KiB
C
Raw Normal View History

/*
2023-01-27 17:03:39 +01:00
* © 2020-2022 Chris Harlow. All rights reserved.
* © 2022-2023 Colin Murdoch
2023-01-27 17:03:39 +01:00
* © 2023 Harald Barth
*
* 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 AFTEROVERLOAD
#undef ALIAS
#undef AMBER
#undef ANOUT
#undef AT
2022-03-18 14:46:07 +01:00
#undef ATGTE
#undef ATLT
2022-01-03 11:15:10 +01:00
#undef ATTIMEOUT
#undef AUTOMATION
#undef AUTOSTART
#undef BROADCAST
#undef CALL
2023-11-23 11:41:35 +01:00
#undef CLEAR_STASH
#undef CLEAR_ALL_STASH
#undef CLOSE
#undef DCC_SIGNAL
2023-09-02 00:29:49 +02:00
#undef DCC_TURNTABLE
#undef DEACTIVATE
#undef DEACTIVATEL
#undef DELAY
#undef DELAYMINS
#undef DELAYRANDOM
#undef DONE
#undef DRIVE
2022-01-02 20:41:57 +01:00
#undef ELSE
#undef ENDEXRAIL
#undef ENDIF
#undef ENDTASK
2023-09-02 00:29:49 +02:00
#undef ESTOP
#undef EXRAIL
#undef EXTT_TURNTABLE
#undef FADE
#undef FOFF
#undef FOLLOW
#undef FON
2022-03-24 11:40:49 +01:00
#undef FORGET
#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
#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
#undef IFNOT
#undef IFRANDOM
2022-04-17 10:58:32 +02:00
#undef IFRED
#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
#undef INVERT_DIRECTION
#undef JOIN
#undef KILLALL
#undef LATCH
#undef LCD
#undef SCREEN
#undef LCC
#undef LCCX
#undef LCN
#undef MOVETT
#undef ONACTIVATE
#undef ONACTIVATEL
#undef ONAMBER
#undef ONDEACTIVATE
#undef ONDEACTIVATEL
#undef ONCLOSE
#undef ONLCC
#undef ONTIME
#undef ONCLOCKTIME
#undef ONCLOCKMINS
#undef ONOVERLOAD
#undef ONGREEN
#undef ONRED
2023-09-02 00:29:49 +02:00
#undef ONROTATE
#undef ONTHROW
2022-12-30 00:46:42 +01:00
#undef ONCHANGE
2022-03-31 23:04:40 +02:00
#undef PARSE
#undef PAUSE
2023-11-23 11:41:35 +01:00
#undef PICKUP_STASH
#undef PIN_TURNOUT
#undef PRINT
2023-04-20 00:16:32 +02:00
#ifndef DISABLE_PROG
#undef POM
2023-04-20 00:16:32 +02:00
#endif
#undef POWEROFF
#undef POWERON
#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
#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
#undef SENDLOCO
#undef SEQUENCE
#undef SERIAL
#undef SERIAL1
#undef SERIAL2
#undef SERIAL3
#undef SERIAL4
#undef SERIAL5
#undef SERIAL6
#undef SERVO
#undef SERVO2
#undef SERVO_TURNOUT
#undef SERVO_SIGNAL
#undef SET
#undef SET_TRACK
#undef SET_POWER
#undef SETLOCO
#undef SIGNAL
2022-03-18 14:46:07 +01:00
#undef SIGNALH
#undef SPEED
#undef START
2023-11-23 11:41:35 +01:00
#undef STASH
2023-11-30 12:32:39 +01:00
#undef STEALTH
#undef STOP
2023-09-02 00:29:49 +02:00
#undef THROW
#undef TT_ADDPOSITION
#undef TURNOUT
#undef TURNOUTL
#undef UNJOIN
#undef UNLATCH
#undef VIRTUAL_SIGNAL
2022-03-24 12:56:06 +01:00
#undef VIRTUAL_TURNOUT
#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
#undef XFOFF
#undef XFON
#ifndef RMFT2_UNDEF_ONLY
#define ACTIVATE(addr,subaddr)
#define ACTIVATEL(addr)
#define AFTER(sensor_id)
#define AFTEROVERLOAD(track_id)
#define ALIAS(name,value...)
#define AMBER(signal_id)
#define ANOUT(vpin,value,param1,param2)
#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)
#define AUTOSTART
#define BROADCAST(msg)
2023-11-23 11:41:35 +01:00
#define CALL(route)
#define CLEAR_STASH(id)
#define CLEAR_ALL_STASH(id)
#define CLOSE(id)
#define DCC_SIGNAL(id,add,subaddr)
2023-09-08 23:22:10 +02:00
#define DCC_TURNTABLE(id,home,description)
#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
#define ENDEXRAIL
#define ENDIF
#define ENDTASK
#define ESTOP
2023-09-02 00:29:49 +02:00
#define EXRAIL
2023-10-16 21:06:35 +02:00
#define EXTT_TURNTABLE(id,vpin,home,description)
#define FADE(pin,value,ms)
#define FOFF(func)
#define FOLLOW(route)
2022-03-24 11:40:49 +01:00
#define FON(func)
#define FORGET
#define FREE(blockid)
#define FWD(speed)
#define GREEN(signal_id)
2022-06-15 12:44:46 +02:00
#define HAL(haltype,params...)
2024-01-14 21:20:22 +01:00
#define HAL_IGNORE_DEFAULTS
#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)
#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)
#define IFRESERVE(block)
2022-01-03 11:15:10 +01:00
#define IFTIMEOUT
2023-09-02 00:29:49 +02:00
#define IFTTPOSITION(turntable_id,position)
2022-12-30 00:46:42 +01:00
#define IFRE(sensor_id,value)
#define INVERT_DIRECTION
#define JOIN
#define KILLALL
#define LATCH(sensor_id)
#define LCC(eventid)
#define LCCX(senderid,eventid)
#define LCD(row,msg)
#define SCREEN(display,row,msg)
#define LCN(msg)
#define MOVETT(id,steps,activity)
#define ONACTIVATE(addr,subaddr)
#define ONACTIVATEL(linear)
#define ONAMBER(signal_id)
#define ONTIME(value)
#define ONCLOCKTIME(hours,mins)
#define ONCLOCKMINS(mins)
#define ONOVERLOAD(track_id)
#define ONDEACTIVATE(addr,subaddr)
#define ONDEACTIVATEL(linear)
#define ONCLOSE(turnout_id)
#define ONLCC(sender,event)
#define ONGREEN(signal_id)
2023-09-02 00:29:49 +02:00
#define ONRED(signal_id)
#define ONROTATE(turntable_id)
#define ONTHROW(turnout_id)
2022-12-30 00:46:42 +01:00
#define ONCHANGE(sensor_id)
#define PAUSE
#define PIN_TURNOUT(id,pin,description...)
#define PRINT(msg)
2022-03-31 23:04:40 +02:00
#define PARSE(msg)
2023-11-23 11:41:35 +01:00
#define PICKUP_STASH(id)
2023-04-20 00:16:32 +02:00
#ifndef DISABLE_PROG
#define POM(cv,value)
2023-04-20 00:16:32 +02:00
#endif
#define POWEROFF
#define POWERON
#define READ_LOCO
#define RED(signal_id)
#define RESERVE(blockid)
#define RESET(pin)
#define RESUME
#define RETURN
#define REV(speed)
2023-09-02 00:29:49 +02:00
#define ROTATE(turntable_id,position,activity)
2023-09-08 23:22:10 +02:00
#define ROTATE_DCC(turntable_id,position)
2021-12-26 19:24:04 +01:00
#define ROSTER(cab,name,funcmap...)
2023-09-02 00:29:49 +02:00
#define ROUTE(id,description)
2023-11-07 17:27:26 +01:00
#define ROUTE_ACTIVE(id)
#define ROUTE_INACTIVE(id)
#define ROUTE_HIDDEN(id)
2023-11-17 11:45:36 +01:00
#define ROUTE_DISABLED(id)
2023-11-07 17:27:26 +01:00
#define ROUTE_CAPTION(id,caption)
#define SENDLOCO(cab,route)
#define SEQUENCE(id)
#define SERIAL(msg)
#define SERIAL1(msg)
#define SERIAL2(msg)
#define SERIAL3(msg)
#define SERIAL4(msg)
#define SERIAL5(msg)
#define SERIAL6(msg)
#define SERVO(id,position,profile)
#define SERVO2(id,position,duration)
#define SERVO_SIGNAL(vpin,redpos,amberpos,greenpos)
#define SERVO_TURNOUT(id,pin,activeAngle,inactiveAngle,profile,description...)
#define SET(pin)
#define SET_TRACK(track,mode)
#define SET_POWER(track,onoff)
#define SETLOCO(loco)
#define SIGNAL(redpin,amberpin,greenpin)
2022-03-18 14:46:07 +01:00
#define SIGNALH(redpin,amberpin,greenpin)
#define SPEED(speed)
2023-11-23 11:41:35 +01:00
#define START(route)
#define STASH(id)
2023-11-30 12:32:39 +01:00
#define STEALTH(code...)
#define STOP
2023-09-02 00:29:49 +02:00
#define THROW(id)
2023-09-08 23:22:10 +02:00
#define TT_ADDPOSITION(turntable_id,position,value,angle,description...)
#define TURNOUT(id,addr,subaddr,description...)
#define TURNOUTL(id,addr,description...)
#define UNJOIN
#define UNLATCH(sensor_id)
#define VIRTUAL_SIGNAL(id)
2022-03-24 12:56:06 +01:00
#define VIRTUAL_TURNOUT(id,description...)
#define WAITFOR(pin)
2023-09-06 23:58:19 +02:00
#ifndef IO_NO_HAL
#define WAITFORTT(turntable_id)
#endif
2023-05-01 15:25:45 +02:00
#define WITHROTTLE(msg)
#define XFOFF(cab,func)
#define XFON(cab,func)
#endif