Willkommen bei MattzoBricks › Foren › MattzoTrainController for Bluetooth (MTC4BT) › Two motors. Forwards and Backwards
- Dieses Thema hat 2 Antworten und 2 Teilnehmer, und wurde zuletzt aktualisiert vor 11 Monaten, 3 Wochen von Matthias Runte.
-
AutorBeiträge
-
-
Mai 14, 2023 um 18:16 Uhr #6305Liam MolloyTeilnehmer
Hi. Thank you / Dankeschön for this wonderful piece of software. I can tell that many hours of blood, sweat and tears has gone into making this.
My son and I are in the process of automating our locos using the MTC4BT and are running into trouble attempting to run a loco with 2 motors on channel A and B of a Lego powered up hub. Both motors are working but they turn in opposite directions. We need them to turn in the same direction as we are using two motors to pull a heavy train. We have tried experimenting by changing the “direction” attribute to combinations of “forward” and “backward” but this does not appear to have any impact and the motors continue to spin in opposite directions.
Are we doing something wrong?
{
“address”: 4,
“name”: “10194”,
“bleHubs”: [
{
“type”: “PU”,
“address”: “90:84:2B:D2:3A:FA”,
“channels”: [
{
“channel”: “A”,
“attachedDevice”: “motor”,
“direction”: “backward”
},
{
“channel”: “B”,
“attachedDevice”: “motor”,
“direction”: “forward”
}
]
}
]
} -
Mai 14, 2023 um 19:13 Uhr #6306Liam MolloyTeilnehmer
I found the issue. In the example configurations on the MTC4BT, “backward” is used but in ‘loadControllerConfiguration.h” in line 116 the value “reverse” is used to set the “isinverted” property when the channels are configured.
In my configuration file I changed “backward” to “reverse” and now the loco runs as expected.
I would recommend either updating the documentation to say “reverse” or updating the code to say “backward”. Updating the documentation would mean the code does not have to be updated.
// loadControllerConfiguration.h
[115] const char *dir = channelConfig[“direction”] | “forward”;
[116] bool isInverted = strcmp(dir, “reverse”) == 0; -
Mai 15, 2023 um 14:04 Uhr #6307Matthias RunteAdministrator
Confirmed. In firmware version V1.0.2, you need to you “reverse”. With V1.1, you can also use “backward” instead of “reverse”. We already updated the documentation, but we are running a bit late with the publication of the new firmware version V1.1.
If you can’t wait, check out the development branch of the git repository for now.
- Diese Antwort wurde geändert vor 11 Monaten, 3 Wochen von Matthias Runte.
-
-
AutorBeiträge
- Du musst angemeldet sein, um auf dieses Thema antworten zu können.