-
Notifications
You must be signed in to change notification settings - Fork 0
Define DCC Turnout Command
David edited this page Dec 14, 2021
·
1 revision
const linearAddressOptions = {
turnout: 12,
address: 1234
}
defineDCCTurnoutCommand(linearAddressOptions)
// returns '<T 12 DCC 1234>'
// :------ OR ------:
const dualCoilAddressOptions = {
turnout: 12,
address: {
primaryAddress: 1234,
subAddress: 2
}
}
defineDCCTurnoutCommand(dualCoilAddressOptions)
// returns '<T 12 DCC 1234 2>'
type ParseAddressParams = number | DualCoilAddress
interface DefineDCCTurnoutCommandParams {
address: ParseAddressParams;
turnout: number;
}
defineDCCTurnoutCommand: (params: DefineDCCTurnoutCommandParams) => string