Currently direct callers of draw_pbar() can have 20 or more digits after
the decimal place. Fix this by moving the rounding function.
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
Currently there is a redundant fill operation issued for every character
drawn. This was added to draw the background colours correctly but the
change did not account for the optimized character rendering in
_draw_glyph().
This results in ~15% performance improvement for character rendering
Fixes: cc34c5d46d ("draw565: Fix wrong background color of strings")
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
Signed-off-by: thefenriswolf <stefan.rohrbacher97@gmail.com>
[daniel@redfelineninja.org.uk: fixed up the manifest]
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
Signed-off-by: Benoît HERVIER <b@rvier.fr>
[daniel@redfelineninja.org.uk: Removed unused dual clock fonts from
clock_dual.py, fixed up the manifest]
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
The music player volume control uses up and down events, but in the
foreground function the app requests left and right events.
Signed-off-by: Tait Berlette <54515877+taitberlette@users.noreply.github.com>
Currently, if the line wrapper attempts to break a line on a space and
that space character is outside the bounding box, then we generate an
over-long line.
Fix this by handling line break generation *after* we have checked the
length of the current line.
Fixes: #193
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
Signed-off-by: Brendan M. Sleight <bms.git@barwap.com>
[daniel@redfelineninja.org.uk: Squashed down into a single commit and
updated subject]
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk
Currently then even fast walking will run off the top of the graph. Change
the scale to that fast walking shows in full. I think at this level fast
running will probably run off the top but I need to gather a few more
details before settling on the final scale.
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
The steplogger records steps but currently there is no way to see the data
recorded on the device itself. Make a first attempt at graphing the
step data.
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
Currently we dump the step data every 30 minutes. This was a good
interval for testing but we can extend it a little without any
problems.
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
Currently steps from the last six minutes do not appear in the data. We
can fix this by updating the data before creating the iterator.
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
Currently, if we ask the simulator to draw out-of-bounds then it will
do exactly that, it will draw outside of the "screen" and corrupt the
pixels of the watch frame that surrounds it. This is an obviously poor
simulation of the real watch and when the out-of-bounds error is only
an out-by-one error can be easily overlooked until we load the code on
the device.
Let's just throw an exception if we draw out-of-bounds. That can easily
be picked up during testing.
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
Currently if the binary file being downloaded contains single quote
characters then it gets wrapped differently by repr() so we have to add
additional cases to strip the wrapper.
Fix this the "obvious" way... where by "obvious" I mean almost anything
but.
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
The code is not yet enabled by default but it can be tested by adding
custom code to an interested user's main.py .
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
run_command has particular benefits for handle_binary_download() because
we can greatly simplify the code to handle running repr() on the target.
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
Add a run_command method for the "console". This allows running a command
on the target and capturing the result. Normally this is handled using
REPLWrapper but that doesn't work well with the NUS console because local
echo gets in the way.
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
--push is very similar to --binary --upload but handles directories
differently. --pull allows us to copy binary files from the target.
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
This should make it a bit easier for people to contribute. Also fixed
the documentations on how to setup on Debian, as certain recommended
packages don't exist.
Signed-off-by: Shuhao Wu <shuhao@shuhaowu.com>
Currently a couple of down presses on the year results in the time being
set to some time in 2099. The micropython date logic does not support
dates this far in the future and throws an exception. Adopt a simple
fix that should be OK for the next 39 years ;-) .
Reported-by: Christopher Peters <me@christopherp.de>
Fixes: #167
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
For small graphical items (line drawing, font glyphs) the performance
of the set_window() method is critical.
Emit native code for this function and optimize the SPI write_cmd()
method to avoid memory allocation. This give a performance boost of
a little over 15% for (24pt) font rendering and 30% for line drawing.
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
Avoid needless bouncing the chip select when drawing glyphs. This
improved performance by around 15% for 24pt fonts.
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>