DCC Speed Step 128 Version
Dependencies: DSgatewayMBED TrackReporterS88_DS mbed
Fork of DSGatewayMBED_Nucleo by
Revision 3:4f03db8aef3b, committed 2015-02-23
- Comitter:
- tyamakun
- Date:
- Mon Feb 23 13:29:36 2015 +0000
- Parent:
- 2:4bece8af05e8
- Commit message:
- DSgateway DCC Speed Step128
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 4bece8af05e8 -r 4f03db8aef3b main.cpp --- a/main.cpp Sat Jan 31 22:16:02 2015 +0000 +++ b/main.cpp Mon Feb 23 13:29:36 2015 +0000 @@ -157,10 +157,23 @@ } else if (function.compare("setPower") == 0) { return ds_gw.SetPower((byte)arguments[0]); - + /* } else if (function.compare("setLocoSpeed") == 0) { return ds_gw.SetLocoSpeed(arguments[0], arguments[1]); } + */ + // Change Code <<Speed Step 128>> 2015/02/23 + } else if (function.compare("setLocoSpeed") == 0) { + if( numOfArguments > 2) + { + return ds_gw.SetLocoSpeedEx(arguments[0],arguments[1],arguments[2]); + } + else + { + return ds_gw.SetLocoSpeed(arguments[0], arguments[1]); + } + } + else if (function.compare("getS88") == 0) { int aMaxS88Num = MAX_S88DECODER;