summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-01-03apps: settings: Use theme colours for text labelsDaniel Thompson
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2021-01-03apps: launcher: Use theme colours for text labelsDaniel Thompson
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2021-01-03apps: heart: Use theme colours for text labelsDaniel Thompson
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-12-31apps: calc: Use the UI colours to generate a backgroundDaniel Thompson
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-12-31manager: Recategorize the theme labels for appsDaniel Thompson
By default bright and mid are white/grey tones, the ui widgets are blue and the spot colours are different variants of orange. Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-12-31wasp: manager: Byte-swap the theme encodingDaniel Thompson
Currently the theme is explicitly little endian. This does match the underlying hardware but makes it needlessly difficult to hand edit themes. Switch the default theme and theming tools over to big endian form and add comments to the default theme to support hand editing. We also expand the ASCII characters in the default them with hex codes. This is the final step needed to make hand edited themes trivial to work with. Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-12-31drivers: bma421: Switch over to reset_step_counter()Daniel Thompson
Currently the bma421 driver simple re-initializes the sensor when asked to set the step counter to zero. Switch over to the proper function for this. Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-12-30apps: steps: Fix typo in docstringsDaniel Thompson
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-12-30widgets: ConfirmationView: Fix hit box problemsDaniel Thompson
The ConfirmationView became broken when we converted it's images over to 2-bit RLE. That happened because the confirmation view relied on the the 1-bit RLE to dynamically generate hit boxes. Currently the code pre-calculates the hit box which is a waste of RAM. Let's rip out the existing hit box logic and replace it with much larger ("fat finger") hit targets. We make the touch() method more closely adopt the idioms of other UI components (e.g. don't return the dialog status... just whether or not we handled the touch). Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-12-30bma42x-upy: Implement step counter resetDaniel Thompson
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-12-29docs: Update screenshots with new battery meterDaniel Thompson
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-12-29apps: alarm: add a full colour iconDaniel Thompson
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-12-29apps: alarm: Adopt the spinner widgetDaniel Thompson
Replace the open coded spinner widget with the newly introduced system one. Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-12-29apps: alarm: avoid setting a "silly" alarm during app initDaniel Thompson
The alarm is off by default so there's no reason to set an alarm that is disabled. Let's stop doing that. Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-12-29widgets: Spinner: Add a simple spinner widgetDaniel Thompson
We are able to add this to the self tests without having to create a special page. Instead we can modify the existing notifications test to utilize the spinner. Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-12-29simulator: Better align simulator RTC API with the nRF APIDaniel Thompson
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-12-29TODO: Add new widgets to the roadmapDaniel Thompson
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-12-29apps: alarm: Adopt the checkbox widgetDaniel Thompson
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-12-29widgets: Checkbox: Add a simple checkbox widgetDaniel Thompson
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-12-29widgets: ConfirmationView: minor docstring tweakDaniel Thompson
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-12-29widgets: Slider: Adopt draw565.lighten for palette managementDaniel Thompson
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-12-29draw565: Add lighten/darken functionsDaniel Thompson
Add functions to generate shades from a single (usually theme provided) basic palette colour. Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-12-29TODO: A couple of small additions to the roadmapDaniel Thompson
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-12-29tools: rle_encode: Add a parameter for direct CLUT lookupDaniel Thompson
This can be useful for hand decoding and authoring of images. Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-12-29apps: calc: Remember the results between invocationsDaniel Thompson
Currently if you spend more then 15 seconds looking up figures or transcribing the answer then the system will switch back to the clock and the answer will be lost. Fix this by remembering the output between invocations. Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-12-29apps: calc: Rewrite the display and calculation engineDaniel Thompson
Currently calculations such as 22/7 do not work correctly on the simulator (which uses double precision floating point). Fix this by explicitly truncating the strings when needed. Additionally the current calculate() method has some problems when the calculation cannot be evaluated since it will needlessly clear out the calculation. Push calculate (and the exception handling) into the caller and report errors using the vibration motor instead. Finally we rename display_output() to the more idiomatic _update(). Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-12-29apps: calc: Optimize the fields lookup structureDaniel Thompson
Currently the fields is a list of lists of strings. This will needlessly consume RAM so lets switch it over to a simple string (which is immutable and can be stored in flash). We also replace indices with simple x and y variables. In addition to avoiding a (temporary) memory allocation this is also easier to use when looking up in fields. Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-12-29apps: calc: Draw a closed gridDaniel Thompson
Currently the calculator uses an open grid. It's a matter of taste but I prefer a closed grid. Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-12-29apps: calc: Correct after draw565 bug fixDaniel Thompson
Currently the coordindates used for line drawing are "tuned" for a bug in the line drawing code (and now draw off the edge of the screen). Fix this. Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-12-29draw565: Allow strings to be right justifiedDaniel Thompson
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-12-28draw565: Handle empty strings when calculating the bounding boxDaniel Thompson
Currently the empty string cannot be drawn into a fixed width box. Fix this by adding a special case for empty strings. Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-12-28draw565: Fix bug in the straight line optimizationDaniel Thompson
Currently the line drawing code does not draw the final pixel of straight lines. Thus a line from (0, 0) to (10, 10) finishes on a different pixel to (10, 0) to (10, 10). Fix this by removing the spurious subtract one from the end point Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-12-28apps: calc: Adopt the system theme for accent colorsDaniel Thompson
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-12-28apps: calc: Move the copyright header to the top of the file.Daniel Thompson
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-12-28apps: calc: Created memory-saving calculator appJohannes Wache
Signed-off-by: Johannes Wache <jbwa@posteo.de>
2020-12-28TODO: Update for the recent flurry of changesDaniel Thompson
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-12-28tools: rle_encode: Make 2-bit encoding the defaultDaniel Thompson
2-bit encoding is fully ROMable and therefore is more RAM efficient than the older 1-bit encoding. Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-12-28simulator: Start with a higher initial voltageDaniel Thompson
Starting with the battery full makes testing the battery meter easier... Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-12-28icons, fonts.digits: Switch over to 2-bit RLE encodingDaniel Thompson
The 2-bit RLE encoding, in addition to supporting colour is also fully ROMable meaning we can save 32 bytes of RAM per image by switching to 2-bit encoding. Switch everything in icons and font.clock over to 2-bit encoding. Note: this requires all the clock PNG files to be reencoded (because they were originally in 1-bit grayscale format and this is no longer supported by the encoder). This reduces RAM overhead by 480 bytes and has only a negligable effect on FLASH usage (+4 bytes). Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-12-28widgets: Reduce the size of the battery iconDaniel Thompson
Currently the battery icon is overlarge compared to other status bar icons such as the BT and notification icons (both of which are 32px high). Fix this by redrawing the battery artwork and updating the widgets in the status bar. Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-12-28apps: snake: Update artworkDaniel Thompson
Update the icon so it more closely resembles the in-game visual style (and also so it compresses better) and update the screenshot since the old one is the wrong size (FullHD instead of 358x406) and doesn't render correctly in the documentation. Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-12-27apps: snake: Fix screenshotsDaniel Thompson
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-12-27apps: chrono: Minor visual improvementsDaniel Thompson
Make the ticks and hands larger and shorten the hands slightly to avoid visual glitches during "undraw". Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-12-27draw565: fix width handling for vertical and horizontal linesDaniel Thompson
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-12-27apps: snake: fix a couple of errorsJohannes Wache
Signed-off-by: Johannes Wache <jbwa@posteo.de>
2020-12-27apps: chrono: Implement a simple analogue watch faceDaniel Thompson
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-12-27draw565: Add a polar line drawing function.Daniel Thompson
Polar coordinates are very convenient for implementing anything with radial lines (such as a traditional watch face). Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-12-27draw565: Add width to the line drawing functionDaniel Thompson
Currently all lines are a single pixel wide. To draw wider lines we must draw two parallel lines with a single pixel offset and this is a *very* inefficient approach, espeically on ST7789 where we spend longer setting the clipping window than we do drawing each pixel. Fix this by constructing a line using a variable sized square rather than a single pixel. This will "overdraw" (some pixels will be drawn more than once) but since square blocks can be efficiently transferred to the display the overdraw is acceptable. Note: It is a difficult decision whether to maintain the convention that color is the last argument or to keep compatibility with existing line drawing tests. This patch opts for the former and fixes up all uses within the existing codebase. Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-12-27draw565: Improve default argument values for line()Daniel Thompson
Currently there are default argument values for the start and end coordinates but the defaults don't really make any sense since there is no reason to prefer the value 0 over any other. Remove them. Similarly color currently defaults to 0xffff which isn't right. It should default to the foreground colour. Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-12-26tests: Auto-discover applications and try to switch to themDaniel Thompson
Currently `make check` doesn't test any not-default applications. Fix this by automatically discovering constructors and ensure that the application can be started and stopped without generating an exception. Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>