Ambit Apps Compilation
-
I don’t understand a damn thing about it .But it’s cool to be able to do structured training for A3P again. And I’m very happy for those who understand how to do it.
-
@pavel-samokha @margusl One of the best posts of the year
Thanks for this
-
Is it possible to create new apps with this method?
How can we set the output format (0 decimal, 1 decimal, time, …)?
How to declare new variables?
Do we set prefix and postfix values just like other variables?Thanks a lot for help.
It is definitely a great step forward to be able to edit Suunto Apps using a command line but it would be much more easy in a graphical way. Any plan for such a user interface?
-
@pavel-samokha
Excellent -
ask for advice,how to use it?
-
We’ll, this is just plain wonderfull!
-
@sebchastang said in Ambit Apps Compilation:
Is it possible to create new apps with this method?
I assume so, though as it lacks proper error handling n etc I’d rather see it as a tool for existing apps users to adjust existing app settings than developing app from scratch.
How to declare new variables?
See “detailed instructions” section on user variables and sample request. Is that what you are asking for or something else?
How can we set the output format (0 decimal, 1 decimal, time, …)?
Do we set prefix and postfix values just like other variables?I just added info about that int “detailed instructions” section
It is definitely a great step forward to be able to edit Suunto Apps using a command line but it would be much more easy in a graphical way. Any plan for such a user interface?
Well, it’s not difficult to create simple UI for that (like editor form & compilation output, not trying to copy Movescount UI) but not sure if I have time to do that and when. Also may be even better to integrate such UI into SL, but we’re unlikely have resources to do that soon.
-
@pavel-samokha Thanks for the clarification and answers.
I also think it is more a way to modify an existing app than creating a new ones.
I asked for new variables because there was a specific section to declare them in movescount but I understand I have to declare and set variable values at the same time in the header section now.
-
Added Simple UI for Compiler
-
Now I have learned more old watches internal names
-
Hi,
I have compilation error when I set prefix and postfix values in the header section.
I have tried:
prefix = “xxx”
prefix = ‘xxx’
prefix = xxxformat is OK. Only prefix and postfix give errors.
Can anybody help me?
Thanks. -
@sebchastang did you put prefix/postfix in the header?
yes (sorry I’ve just relized you wrote that). I moved those in the code . -
@sebchastang I’ll check on the weekend
-
@G-Q @pavel-samokha thanks for your answers.
-
@sebchastang
prefix = xxx
should work now -
@pavel-samokha Thanks a lot!
It’s all good nowDo you think there is a possibility (in a near future) to give access to the app simulator we had in movescount to test the apps?
-
@sebchastang Unfortunately, I think it’s unlikely
-
The trial is OK, thank you!
-
@pavel-samokha Thank you for the implementation!
I’ve created the below app, but when trying to create or edit a sport mode, displays are not loading.
curl --location --request POST 'https://ambitappscompiler.azurewebsites.net/api/compile' \ --header 'x-functions-key: qakj8vb/62VgzmSl19mDQzRmW7nCSDv0zAo2A1aC3ldfd8U8r5jksA==' \ --header 'Content-Type: text/plain' \ --data-raw '/* Duration App */ /* Interval 1 */ /* Initialize variables */ if (SUUNTO_DURATION == 0) { RESULT = 0; } /* Lap 1, 2 is step type Interval with duration type Time */ if (SUUNTO_LAP_NUMBER == 1 || SUUNTO_LAP_NUMBER == 2) { prefix = "int"; postfix = "s"; RESULT = 5 - SUUNTO_LAP_DURATION; } /* Lap 3 is step type Interval with duration type Time */ if (SUUNTO_LAP_NUMBER == 3) { prefix = "int"; postfix = "s"; RESULT = 10 - SUUNTO_LAP_DURATION; } /* Lap 4, 5, 6 is step type Interval with duration type Time */ if (SUUNTO_LAP_NUMBER == 4 || SUUNTO_LAP_NUMBER == 5 || SUUNTO_LAP_NUMBER == 6) { prefix = "int"; postfix = "s"; RESULT = 15 - SUUNTO_LAP_DURATION; } /* Lap 7 is step type Interval with duration type Time */ if (SUUNTO_LAP_NUMBER == 7) { prefix = "int"; postfix = "s"; RESULT = 20 - SUUNTO_LAP_DURATION; } /* Check if duration is reached */ if (RESULT < 0) { RESULT = 0; /* Alert that duration is reached */ Suunto.alarmBeep(); Suunto.light(); }'
-
@christos-palikaras I guess corrupted index.json may be cause this. I’ll try to update doc with more detailed instructions.