Since SDK 3.1.x ability to set front/rear gear in the simulator has been removed. Before, it was possible to set this information using settings menu when running an app.
Is this a bug or has this feature been removed consciously?
Since SDK 3.1.x ability to set front/rear gear in the simulator has been removed. Before, it was possible to set this information using settings menu when running an app.
Is this a bug or has this feature been removed consciously?
It doesn't for me if I use a .FIT file created with shifting paired. In fact, looking at the raw .FIT file, I can't see anywhere that it even records each shift. I'll play around a little more…
Thanks ekutter-dnu. We'll look into this.
I tried playing back the fit you posted just to check if the appropriate fields (frontDeraillerIndex, etc) in Activity.Info were populated, but nothing there either - just nulls
Yes, this was by design. We added support for ANT+ shifting sensors in the simulator. You should be able to access the functionality via Settings > Manage ANT+ Sensors menu.
While this is better in some ways, it could be problematic if you don't have an ANT+ shifting sensor or an ANT+ dongle.
When I bring up the Manage ANT+ sensors screen, it's completely blank (SDK3.1.8). Surely, I don't have to bring the bike into the house, place it next to the computer and plug in an ANT+ dongle, just to test I can see gears on the screen??
Unfortunately I think that's what Travis is saying. I'm just getting started with this. The docs are a little thin on using the Shifting interface. Looks like I'm going to be taking my laptop out to the garage.
If you record a .fit with shifting data, do you see that when you play back the .fit in the sim?
It doesn't for me if I use a .FIT file created with shifting paired. In fact, looking at the raw .FIT file, I can't see anywhere that it even records each shift. I'll play around a little more, but nothing obvious in the RECORD messages (messages that record every data point) and no messages that seem to happen each time I shift. Might be something in the lap and summary messages for total shifts. I tried with .FIT files created both on a 530 and 1030.
I do see the DEVICE message for the shifting sensor in the .FIT file, that specifies it has gears 1-12, but that's it.
For those trying to use the shifting interface, here is the code I found to work. You can also just callToybox.AntPlus.Shifting.getShiftingStatus(); but you do first need to make sure it has Shifting.
class MyShifting extends Ant.ShiftingListener { function onShiftingUpdate(a) { Sys.println(Lang.format("gear: $1$ / $2$ => $3$", [ a.rearDerailleur.gearIndex, a.rearDerailleur.gearMax, a.rearDerailleur.gearSize ])); } function onBatteryStatusUpdate(bat) { //1=new, 2=good, 3=OK, 4=Low, 5=Critical Sys.println("Shifting Battery Status: " + bat.batteryStatus); } } //and in my view initializer I have ... if (Toybox.AntPlus has :Shifting) //requires CIQ 3.1 { shifting = new Ant.Shifting(new MyShifting()); } ...
Turns out shifting is in the file and I just didn't know where to look. They are stored in the activity file as EVENT messages. EVENTTYPE=MARKER, EVENT id is 43. low byte contains the shift index. 2nd byte contains the tooth count. Not sure what the high word shows yet but I'm getting 0x2201 for all the shifts.
So no reason the simulator couldn't simulate this.
Here's a short activity file created with a E530 with a shift every 5 seconds or so. Starts in gear 6, down to 0, up to 11, back to 6.
Thanks ekutter-dnu. We'll look into this.
thanks. That high word of 0x2201 is the front gears. single chain ring has 34 teeth.
I tried playing back the fit you posted just to check if the appropriate fields (frontDeraillerIndex, etc) in Activity.Info were populated, but nothing there either - just nulls