mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2024-11-23 08:06:13 +01:00
Not much progress
This commit is contained in:
parent
b277d204f0
commit
ff9c558b61
|
@ -1035,17 +1035,17 @@ bool DCCEXParser::parseI(Print *stream, int16_t params, int16_t p[])
|
|||
case 0: // <I> list turntable objects
|
||||
return Turntable::printAll(stream);
|
||||
|
||||
case 1: // <T id> delete turntable
|
||||
case 1: // <I id> delete turntable
|
||||
if (!Turntable::remove(p[0]))
|
||||
return false;
|
||||
StringFormatter::send(stream, F("<O>\n"));
|
||||
return true;
|
||||
|
||||
case 2: // <T id position> - rotate to position for DCC turntables
|
||||
case 2: // <I id position> - rotate to position for DCC turntables
|
||||
DIAG(F("Rotate DCC turntable %d to position %d"), p[0], p[1]);
|
||||
return true;
|
||||
|
||||
case 3: // <T id position activity> rotate to position for EX-Turntable
|
||||
case 3: // <I id position activity> rotate to position for EX-Turntable
|
||||
DIAG(F("Rotate EXTT turntable %d to angle %d with activity %d"), p[0], p[1], p[2]);
|
||||
return true;
|
||||
|
||||
|
|
|
@ -74,7 +74,7 @@ bool Turntable::remove(uint16_t id) {
|
|||
pp->_nextTurntable = tto->_nextTurntable;
|
||||
}
|
||||
|
||||
// delete (EXTTTurntable *)tto;
|
||||
delete (EXTTTurntable *)tto;
|
||||
|
||||
turntablelistHash++;
|
||||
return true;
|
||||
|
|
|
@ -57,6 +57,12 @@ protected:
|
|||
uint16_t id;
|
||||
} _turntableData;
|
||||
|
||||
// Linked list to store either positions (EXTT) or DCC addresses (DCC)
|
||||
struct Position {
|
||||
int16_t position;
|
||||
Position *next;
|
||||
};
|
||||
|
||||
// Pointer to next turntable object
|
||||
Turntable *_nextTurntable = 0;
|
||||
|
||||
|
@ -146,7 +152,6 @@ private:
|
|||
struct EXTTTurntableData {
|
||||
uint8_t i2caddress;
|
||||
VPIN vpin;
|
||||
long **positions; // Array of longs to store step positions
|
||||
} _exttTurntableData;
|
||||
|
||||
// Constructor
|
||||
|
|
Loading…
Reference in New Issue
Block a user