1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2024-12-25 05:31:24 +01:00
CommandStation-EX/EXRAIL2MacroReset.h

300 lines
6.6 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
#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
#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 LCN
#undef MOVETT
#undef ONACTIVATE
#undef ONACTIVATEL
#undef ONAMBER
#undef ONDEACTIVATE
#undef ONDEACTIVATEL
#undef ONCLOSE
#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
#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
#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 SETLOCO
#undef SIGNAL
2022-03-18 14:46:07 +01:00
#undef SIGNALH
#undef SPEED
#undef START
#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)
#define CALL(route)
#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-09-09 21:30:48 +02:00
#define EXTT_TURNTABLE(id,vpin,i2c_address,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...)
#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 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 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-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)
#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 SETLOCO(loco)
#define SIGNAL(redpin,amberpin,greenpin)
2022-03-18 14:46:07 +01:00
#define SIGNALH(redpin,amberpin,greenpin)
#define SPEED(speed)
#define START(route)
#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