In the camp of application developers and dials for Pebble, a long-awaited joy happened: in the cloud for the development of PebbleCloud a clock emulator became available, which allows you to now debug what is written without a constant download to the clock!
What is especially nice is that no special TV movements need to be done to access it.
: just go to
CloudPebble , and run your project. By default, the project will be launched exactly in the emulator, and to launch it, in the old-fashioned way, you will need to go to the Compilation tab on the clock and select the Phone option (since it is the phone that downloads the application to the clock).
')
The emulator allows you to run applications both native and created using JS frameworks (both PebbleKit JS and Pebble.js). The emulator itself works, by the way, in the QEMU environment, so we can speak about full emulation, and not about the image of the clock-like behavior when running some clear code - the code will actually be executed in the firmware and on the virtual hardware of the clock.
Interaction with the emulator is possible either using the mouse, or you can click on the screen and then press the cursor keys on the keyboard to emulate pressing the buttons of the clock. In addition, with the active keyboard, you can press X, Y, or Z to virtually “move” the clock in the positive direction along the specified axis, or shift-X, shift-Y, or shift-Z to “move” in the negative direction.
You can also set the state of the clock using the pop-up settings dialog:
As you can see, here you can not only change the “current state” of the clock to check how your code reacts to it (you can, as you can see, change the charge level of the clock’s battery, set whether they are connected to charging, indicate whether bluetooth communication is active), but and call the settings dialog of your application (if any), and also completely turn off the emulator.
To properly work out the display of the settings panel, however, you need to make changes to the project code: when you call the panel, it will be given the request parameter
return_to
- if it is passed, you should use the value specified in it instead of
pebblejs://close#
. Let's say you can do something like this:
Honestly, it is interesting to follow the development of Pebble services. The clock emulator directly asked for a good cloud-based development environment, which was PebbleCloud, and finally, after a rather long development process, it appeared in the public version of the cloud. Let's try?
PS Written on
information from the Pebble blog , from the newsletter, from communication with Pebble images on the
QEMU Advent Calendar website, therefore it was decided not to mark the “translation” post.