1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2024-11-22 23:56:13 +01:00
CommandStation-EX/EXRAIL2MacroReset.h

231 lines
5.0 KiB
C
Raw Normal View History

/*
2022-01-07 02:28:35 +01:00
* © 2021-2022 Chris Harlow
* © 2020,2021 Chris Harlow. All rights reserved.
*
* 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
#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 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
#undef ESTOP
#undef EXRAIL
#undef FADE
#undef FOFF
#undef FOLLOW
#undef FON
2022-03-24 11:40:49 +01:00
#undef FORGET
#undef FREE
#undef FWD
#undef GREEN
#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
#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
#undef INVERT_DIRECTION
#undef JOIN
#undef KILLALL
#undef LATCH
#undef LCD
#undef LCN
#undef ONACTIVATE
#undef ONACTIVATEL
#undef ONDEACTIVATE
#undef ONDEACTIVATEL
#undef ONCLOSE
#undef ONTHROW
2022-03-31 23:04:40 +02:00
#undef PARSE
#undef PAUSE
#undef PIN_TURNOUT
#undef PRINT
#undef POM
#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
#undef ROSTER
#undef ROUTE
#undef SENDLOCO
#undef SEQUENCE
#undef SERIAL
#undef SERIAL1
#undef SERIAL2
#undef SERIAL3
#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
#undef THROW
#undef TURNOUT
#undef UNJOIN
#undef UNLATCH
2022-03-24 12:56:06 +01:00
#undef VIRTUAL_TURNOUT
#undef WAITFOR
#undef XFOFF
#undef XFON
#ifndef RMFT2_UNDEF_ONLY
#define ACTIVATE(addr,subaddr)
#define ACTIVATEL(addr)
#define AFTER(sensor_id)
#define ALIAS(name,value...)
#define AMBER(signal_id)
#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 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
#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
#define FREE(blockid)
#define FWD(speed)
#define GREEN(signal_id)
#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)
#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
#define INVERT_DIRECTION
#define JOIN
#define KILLALL
#define LATCH(sensor_id)
#define LCD(row,msg)
#define LCN(msg)
#define ONACTIVATE(addr,subaddr)
#define ONACTIVATEL(linear)
#define ONDEACTIVATE(addr,subaddr)
#define ONDEACTIVATEL(linear)
#define ONCLOSE(turnout_id)
#define ONTHROW(turnout_id)
#define PAUSE
#define PIN_TURNOUT(id,pin,description...)
#define PRINT(msg)
2022-03-31 23:04:40 +02:00
#define PARSE(msg)
#define POM(cv,value)
#define POWEROFF
#define POWERON
#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...)
#define SENDLOCO(cab,route)
#define SEQUENCE(id)
#define SERIAL(msg)
#define SERIAL1(msg)
#define SERIAL2(msg)
#define SERIAL3(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
#define THROW(id)
#define TURNOUT(id,addr,subaddr,description...)
#define UNJOIN
#define UNLATCH(sensor_id)
2022-03-24 12:56:06 +01:00
#define VIRTUAL_TURNOUT(id,description...)
#define WAITFOR(pin)
#define XFOFF(cab,func)
#define XFON(cab,func)
#endif