Commit Graph

330 Commits

Author SHA1 Message Date
anschrammh
bc37beb5c0 Added a new function to the watch peripherals API to vibrate the watch with a custom pattern 2023-05-30 19:09:26 +02:00
Anatole SCHRAMM
5276ce1664 Added a timer to update the playing's music current position, will have to do a minor rework for it to be flawless. 2023-05-16 13:45:41 +02:00
anschrammh
6e8802399b music_player_screen slight timer update 2023-05-16 08:42:41 +02:00
8ee1be93c6 Added the music player UI mockup 2023-05-14 22:18:41 +02:00
c9f84fd5c1 Added missing strcasecmp function prototype in the include file 2023-05-14 22:17:55 +02:00
fa574d0baa Added some new words translation for the music player screen 2023-05-14 22:16:44 +02:00
47e31a1210 Rephrased some API comments 2023-05-14 22:15:14 +02:00
17164c722e Integrated the music player screen to the watch's firmware + minor other things 2023-05-14 22:14:38 +02:00
cf7c52c1eb Commented the API 2023-05-14 22:13:26 +02:00
df4ab1f790 Proper comments format 2023-05-14 22:12:26 +02:00
6df9ab5aad Added the music player icon + saving the menu list scroll position when leaving an app 2023-05-14 22:11:47 +02:00
edb127e626 Updated the gadget bridge parser 2023-05-14 22:10:13 +02:00
23f592bcc1 Finally added the music player used to control the music playback of the phone through the BLE connection. It works great, some minor adjustements to do though. 2023-05-14 22:09:43 +02:00
890e461b90 Finished the UI of the music player, still need to properly increment the current track play position 2023-05-14 22:08:12 +02:00
66fa33cde1 Now saving the scroll position of the menu to resum it when exiting an app 2023-05-14 22:06:58 +02:00
677c3f3a67 Made slights adjustement to the parser to correctly parse the artist song tag when the album tag is present 2023-05-14 22:06:09 +02:00
faefc7df74 Music player screen is almost done, a few things more to tweak 2023-05-13 00:19:19 +02:00
2f50aa50c6 With the current driver state, it is possible to detect heart beats and thus compute the current heart rate. More things to come. 2023-05-12 15:24:59 +02:00
880dd9cb0e MAX3010X driver continued and to be continued ... 2023-05-12 12:31:01 +02:00
61d8f80551 Renamed MAX3010X.h/c driver files 2023-05-11 21:57:20 +02:00
anschrammh
dc2f1dcecc Replaced lv_color_make(0xFF, 0xFF,0xFF) with lv_color_white(). 2023-05-11 07:22:56 +02:00
anschrammh
8aa309b0c6 Minor changes + added the initialization code for the music player screen 2023-05-11 07:19:19 +02:00
anschrammh
42c01e1d08 Continued to work on the MAX3010X driver, setup function is complete, still a lot to port/implement 2023-05-11 07:18:11 +02:00
anschrammh
23d3c47374 Renamed the music control screen to music player screen and continued dev on it, not finished though 2023-05-11 07:16:58 +02:00
3ae5bb9bdf Continued to implement/port the MAX30102 using the sparkfun library. Still work to be done ! 2023-05-08 21:30:58 +02:00
ee5a466666 Renamed register name define to be easier to understand 2023-05-08 21:29:15 +02:00
3cfbfdc843 Moved registers defines of the various I2C drivers I wrote from the header file to the source file because they do not need to be exposed. Started to write/port the Heart Rate Sensor (MAX30102) driver 2023-05-07 08:50:23 +02:00
anschrammh
004dbde4df Developping a music control screen/app for the watch in the lvgl simulator, work is in progress 2023-05-04 07:35:34 +02:00
anschrammh
0d74cf001c Renaming 2023-05-03 22:53:52 +02:00
anschrammh
dba1a5182d Did some renaming 2023-05-03 22:52:17 +02:00
anschrammh
fdc8eb4c99 Removed warning due to missing header files and unused variable 2023-05-03 22:50:36 +02:00
6f57d01242 Updated lvgl simulator and GadgetBridge parser code::block's layout files 2023-05-01 21:10:29 +02:00
b435687e33 Added the find my phone app/feature source files 2023-05-01 21:05:26 +02:00
a9c9e7688c Updated the lvgl simulator files to include the new find my phone app feature 2023-05-01 21:04:21 +02:00
6936eb2a0e Minor change : removed the capital letter at the front of some parameters 2023-05-01 21:02:26 +02:00
99263462ad Added the find my phone app/feature with it's related translation in english, french and german 2023-05-01 21:01:28 +02:00
8a636a238c Added a new icon used for the find my phone app 2023-05-01 21:00:30 +02:00
30a841227b Quickly calibrated the compass to check if it worked with the PCB in the casing and with the magnetic connector nearby, and it does 2023-04-23 21:02:27 +02:00
b45c5fdcbf Updated the Gadget Bridge parser to parse debug frames needed when implementing the notification manager 2023-04-23 20:27:29 +02:00
e3321d67ab Updated settings screen in the lvgl simulator 2023-04-22 22:52:49 +02:00
5bc20d03d7 Added two new messages to parse 2023-04-22 22:51:33 +02:00
7a6810a56e Added BLE pairing security when this is the first time the watch is paired to a phone. Depending on the capabilities of the device, it might be required to enter a pass key for bonding. 2023-04-22 22:40:41 +02:00
41febe5fef Added missing include to get rid of the explicit declaration warning 2023-04-22 22:37:54 +02:00
ebf7f07789 Implemented a few new callbacks 2023-04-22 13:23:20 +02:00
e698dfb274 Now displaying the BLE device MAC address in the connectivity tab 2023-04-22 13:21:35 +02:00
3fe41b0971 Added new functions to the API 2023-04-22 13:20:44 +02:00
a550c52c39 Added a function to generate a random 6 digit number, this number could be used as the bluetooth pairing code 2023-04-22 13:20:15 +02:00
2206b6f2fb Added enum to string utility function for the IO action 2023-04-22 13:16:39 +02:00
anschrammh
1859f31275 Updated lvgl simulation files 2023-04-20 13:16:51 +02:00
anschrammh
13b3ecfacf Changed log write frequency 2023-04-20 13:16:03 +02:00
anschrammh
17d8c9949d Added new data to save to flash and new accessor functions, work is still in progress ! 2023-04-20 13:15:15 +02:00
anschrammh
ef0abe0ab7 Added new informations in the about section (raw magnetometer data, raw pressure and temperature and more). 2023-04-20 13:14:05 +02:00
anschrammh
fcc152f64d Changed some core logic, now sending the watch's battery information when connected every 5 minutes to the phone so that gadget bridge can draw and update the battery graph. Added annd implemented a few callbacks used by the watch_settings screen 2023-04-20 13:13:06 +02:00
anschrammh
552644a412 Minor date number placement rework 2023-04-20 13:09:51 +02:00
anschrammh
5ea4d8fb38 Re enabled the tick hook function in FreeRTOS used by the millis function 2023-04-20 13:09:28 +02:00
anschrammh
5f7ac5a1d1 Introduced a new event which can be passed to the calling application : BLE_SERVICE_MODE_UNSUBSCRIBED, added a function to the API allowing to set the battery service level (still need to check if a device is subscribed to the characteristic to send the new value ot it). 2023-04-20 13:08:23 +02:00
anschrammh
03f86ea483 Finished to implement the millis api? It uses the FreeRTOS tick hook function to keep track of running time. 2023-04-20 13:01:50 +02:00
anschrammh
2df2f332bf Exposed the magnetometer's internal temperature sensor reading. It is not precise and not accurate, but interesting 2023-04-20 12:57:44 +02:00
anschrammh
8ea47fb03c Added description comment 2023-04-20 12:56:05 +02:00
anschrammh
e2fb8b3822 Reworked the watch's sleep feature and internal workings, added a new sleep mode when BLE is enabled, now sending the watch's battery level, voltage and state to the GadgetBridge app when it connects to the watch 2023-04-13 13:41:42 +02:00
anschrammh
9f241454c6 Finally reworked the way date and time are set so that they have the expected value and behaviour 2023-04-13 13:40:00 +02:00
anschrammh
0789cc62ad Commented debug traces out so that they are not diplayed on the serial port anymore 2023-04-13 13:38:50 +02:00
anschrammh
82ad6d16ba Added a function in the lvgl input device binding file to be able to know if the touch screen was touched or not 2023-04-13 13:37:50 +02:00
anschrammh
c885568e34 Wrapped and added new functions to the watch_peripherals module to be able to prepare the watch for different sleep modes, and being able to detect different wakeup sources. Changed the function used for the BMA456 driver required micro seconds delay 2023-04-13 13:36:48 +02:00
anschrammh
92de986dba Added a new event to the ble_service_state_change event callback function to be able to detect when a BLE master device subscribed to a particular characteristic. Also reworked the allocated buffers for the BLE stack, because of a strage issue, where it is hard for the phone to reconnect to the watch. 2023-04-13 13:34:38 +02:00
anschrammh
cfc42779dd Added new app_utils module/lib containing miscellaneous utility functions like blocking delays and such. Still need to fully implement the elapsed_ms function. 2023-04-13 13:31:54 +02:00
anschrammh
4184be2763 Changed the way the lvgl tick is handled, it was previously called from
the FreeRTOS vApplicationTickHook function and is now called by a timer
interrupt every ms. This permits to stop the timer and thus lvgl when it
is not needed.
2023-04-13 13:27:07 +02:00
anschrammh
89c33cd7f7 Updated settings screen in the simulator 2023-04-11 01:04:58 +02:00
8c1627b9b2 Officially added the gadget bridge parser I developed to the W800_Smart_Watch firmware 2023-04-10 21:26:25 +02:00
2b80115e47 Added some functionalities on the UI side in the code blocks simulator 2023-04-10 21:24:04 +02:00
090e1a2d61 Added the API function doc comments 2023-04-10 21:23:02 +02:00
dea34c70e8 Added a persistency setting : the Activity one, which will be used to save the step counter feature (Enabled or not) as well as other activity related parameters 2023-04-10 21:21:59 +02:00
288a64d1ce Did some cleanup by removing direct access to the watch sensor for initialization, added the gadget bridge parser I coded, and other minor stuff 2023-04-10 21:20:38 +02:00
22621219f3 Corrected a potential bug, made the date and time rollers disabled when set automatic time and date is enabled. Added the set automatic time and date feature which time and dates, if enabled, are sent by the Gadget Bridge Android Application 2023-04-10 21:19:19 +02:00
1c39e02f11 Added new line at the end of the file 2023-04-10 21:17:01 +02:00
da59200c77 Minor changes, nothing major 2023-04-10 21:16:27 +02:00
92d3279eb9 Big refactoring and cleanup by removing sensors initialization code from the gfx_task.c file and moving it to the watch_peripherals.c source file. This is way more logical IMO. This change also allows to enable or disable the wrist tilt wakeup with a function call 2023-04-10 21:15:47 +02:00
b8a11a8a79 Renamed QMC5883L_Mode_Control enumeration values to make it clear they are to be used in the magnetometer API 2023-04-10 21:13:18 +02:00
efae9a917e Added a function to the pressure sensor API to be able to know if a measurement is currently being made 2023-04-10 21:12:01 +02:00
f4ffc96d5a Added the CodeBlocks project used to develop the Gadget Bridge parser code 2023-04-10 10:07:57 +02:00
3bd772837c Minor change 2023-04-10 10:02:22 +02:00
Anatole SCHRAMM
e67754b878 Minor work on the translation module, work in progress, more to be done 2023-04-05 14:47:00 +02:00
Anatole SCHRAMM
bd6d5fc6d1 Finally cleaned the wm_type_def.h file which was provided by WinnerMicro's SDK... 2023-04-05 14:27:22 +02:00
Anatole SCHRAMM
d4c516177d Added comment on modified nimble stack default value 2023-04-05 09:26:10 +02:00
anschrammh
9f7e516984 Added the uint64_t type as a typedef. Will have to do some cleanup in file as it is a mess... 2023-04-05 08:19:08 +02:00
anschrammh
4da41970a6 Registered the setTimeFormatSettingsCallback 2023-04-05 08:17:59 +02:00
anschrammh
8d408b5125 Added translations in the menu item list (on the left hand side of the configuration screen), added time format (12H/24H) setting restoration callback 2023-04-05 08:17:24 +02:00
anschrammh
d0c933c78c Added new words to translate in the enum and started to translate some of them, work in progress 2023-04-05 08:13:38 +02:00
anschrammh
92a275dc1c Slight improvement in the rf modem management for BLE 2023-04-05 08:08:15 +02:00
anschrammh
08b1b8de90 Added header with date, licence and author 2023-04-05 08:04:52 +02:00
c26a88d21c Added a function to the API allowing to register a step count indicator callback used to refresh the step counter of the watch face twice or three time a second. 2023-04-02 21:14:57 +02:00
ad61388bf6 Now starting the rf modem in bluetooth mode 2023-04-02 21:13:14 +02:00
f2b17bffd3 Added the option to only set the rf modem in bluetooth mode when starting it, this makes the power consumption drop significantly 2023-04-02 21:12:45 +02:00
f040e22af7 Deleted unused function prototype 2023-04-02 11:25:32 +02:00
2bfddce356 Fixed bad library path in Makefile ... 2023-03-31 10:57:09 +02:00
2650cf85f9 Merge branch 'master' of http://82.64.196.164/git/Th3maz1ng/W800_Smart_Watch 2023-03-31 10:28:39 +02:00
a7dd2b6af0 Removed blank line 2023-03-31 10:27:53 +02:00
anschrammh
1ef9face5a Updated lvgl simulated screen files 2023-03-30 13:27:24 +02:00
anschrammh
ea79af772b Halfed the BLE prefered MTU size changing it to 256 instead of 512 2023-03-30 13:26:28 +02:00
anschrammh
6a9639700b Added new functions to the watch face API such as watch_face_set_step_count_indicator or watch_face_is_in_use 2023-03-30 13:24:48 +02:00
anschrammh
61f7e21cb3 Added more information in the about section of the settings screen : battery voltage, factory reset button and other things 2023-03-30 13:16:35 +02:00
anschrammh
47753131d6 Added BLE support to the app, fixed a graphical glitch happening when
waking up the watch by touching the screen where the second hand was
jumping from the old time to the new time
2023-03-30 13:14:35 +02:00
anschrammh
3156976f7a Removed the BLE device name from this header file 2023-03-30 13:11:19 +02:00
anschrammh
b5cc52df81 Commented a trace statement in the ble service in order to keep the serial traces clean 2023-03-30 13:09:55 +02:00
anschrammh
e8583254e6 Wrapped the SDIO MMC IO busy wait statement in a function such that it can be called by any API needing it 2023-03-30 13:08:57 +02:00
anschrammh
2b79a31165 Fixed an issue when sending commands to the LCD screen while a DMA
transfer is in progress causing graphical issues
Detail :
A DMA transfer may be in progress when trying to send single byte commands to the LCD screen. This could badly configure the display as soon as the data/command select pin was set to command while the DMA was still sending data bytes.
The fix : doing a busy wait in the lcd_set_data function to be sure the bus is free to use.
2023-03-30 13:05:53 +02:00
anschrammh
a58c453f58 Added a define to easily set the BLE advertised name of the W800SmartWatch 2023-03-30 12:56:32 +02:00
anschrammh
160a2f88db Added new watch face background image with the steps counter icon 2023-03-26 23:30:50 +02:00
anschrammh
ef6e9c3779 Added new firmware_version.h file which will list all the changes with their associated version number. It also containes the firmware build time and date 2023-03-26 23:25:35 +02:00
anschrammh
fe94e2b896 Pushing updates done to the LVGL emulator project files 2023-03-26 23:24:39 +02:00
anschrammh
beb7a86af1 Added a lot of settings handling callbacks, added the code to test the BMA456 step counter feature and it seems to work just fine 2023-03-26 23:22:45 +02:00
anschrammh
721db527ce Added the ble modem and service source files (at last) 2023-03-26 23:21:27 +02:00
anschrammh
85e5fec2cd Updated the watch face background image 2023-03-26 23:19:08 +02:00
anschrammh
622681128c Reworked the vibration duration when touching the screen 2023-03-26 23:18:14 +02:00
anschrammh
214e174ffc Implemented the logic to detect and read the charge controller status pins using two different policies :
- the first one (also used right now) is using interrupts on the two lines
- the second one was doing some polling using a timer interrupt to check the controller status
2023-03-26 23:17:20 +02:00
anschrammh
9f574f0486 Added new features and graphics to the watch face :
Added a battery icon which is blinking when the battery is low
Addes a charging and charged battery icon
Added a step count counter widget with icon and count
Added a bluetooth status icon showing when ble is enabled,disabled and when a device is connected
Added the possibility to hide the hour and minute hands with a long press on the screen, this enables to see information which might be hidden by the hands ...
2023-03-26 23:13:30 +02:00
anschrammh
8a9b805b95 Added new persistency methods, reworked some old ones and added every settings set functions 2023-03-26 23:09:36 +02:00
anschrammh
9458948f59 Added support for new settings with their callbacks, adjusted vibration motor duration, added a factory reset button and now saving the settings to flash memory when leaving the settings screen 2023-03-26 23:07:43 +02:00
anschrammh
22805a4e54 Added the I2C clock speed parameter to the app_config.h file. Max working clock speed seems to be 300kHz 2023-03-26 23:04:43 +02:00
anschrammh
f1af0cd0d6 Adjusted rtc's year setting ... 2023-03-24 16:39:22 +01:00
anschrammh
f1e71bba67 Turned off a lot of functionalities related to TCP IP and WiFi to free some RAM, might be turned on back again later if needed and if RAM space left :P 2023-03-24 15:26:11 +01:00
anschrammh
d05aa72135 Updated all the settings callbacks to be compatible with the new setting system 2023-03-24 15:23:17 +01:00
anschrammh
4c1f1e168a Updated a log trace to be more meaningful 2023-03-24 15:22:15 +01:00
anschrammh
f8dace1dc1 Reduced the main's task stack size from 4k to 2k 2023-03-24 15:18:07 +01:00
anschrammh
2761a53a49 Reduced FreeRTOS available heap from 12k to 4k 2023-03-24 15:17:04 +01:00
anschrammh
2481699356 Vibration settings are now taken into account at lvgl input device driver layer 2023-03-24 15:15:19 +01:00
anschrammh
b65ab1ad4e Reduced LVGL allocated RAM by 10K. This RAM will be useful when running the BLE stack ... 2023-03-24 15:10:17 +01:00
anschrammh
b31cc96c10 Added the tls_is_rtc_running function which is not part of the official SDK. This allows to start the RTC after a reset and to know when it stopped running. 2023-03-24 15:10:16 +01:00
anschrammh
061fdb729b Updated the menu to now use the translation module to display the selected language 2023-03-24 15:06:14 +01:00
anschrammh
7e11913535 Added new watch settings in the persistency layer, added flash read and write functions, work still in progress 2023-03-24 15:06:14 +01:00
anschrammh
185b7a7efa Major rework of the settings screen :
- reduced RAM footprint by 10K :-)
- Added the new about category displaying infos about the watch's firmware
- Now widgets are reloaded with current parameters's values
- Almost all settings are taken into account
2023-03-24 15:06:14 +01:00
anschrammh
728394ff22 Reworked the compass screen to work for both possible platforms (breadboard and PCB) 2023-03-24 15:06:14 +01:00
anschrammh
86be55b404 Reworked the common screen header to add scrolling when the title is too long and to be able to update it's title after is has been created 2023-03-24 15:06:14 +01:00
anschrammh
5d3b5b5285 Added new wrapper functions to interact more easily with the watch's peripherals 2023-03-24 15:06:14 +01:00
anschrammh
beec1570c0 Reworked the orientation of the screen depending on the defined platform in app_config.h 2023-03-24 15:06:14 +01:00
anschrammh
f770a8e436 Added new parameter to be able to build the firmware for the breadboard platform or the PCB (latest) platform 2023-03-24 15:06:14 +01:00
anschrammh
6c4a186a19 Added the new translation module to the project by updating the include paths + makefile 2023-03-24 14:48:20 +01:00
anschrammh
323f1f2996 Added a translation module to implement multilanguage support 2023-03-24 14:45:55 +01:00
anschrammh
0874a24cb9 Added a new header file to track the version history of the firmware and to display the running version 2023-03-24 14:44:30 +01:00
anschrammh
099fe8cea7 Added an other charging state which wasn't an error : when both lines are high, this indicates that no charger is currently plugged to the watch 2023-03-22 08:24:20 +01:00
Anatole SCHRAMM
c97891d898 Added MCU pin definition for reading battery charge controller IC statuses 2023-03-20 17:55:01 +01:00
Anatole SCHRAMM
a752c9765d Adding the battery controller IC charging, charged and unplugged status detection, work in progress 2023-03-20 17:53:38 +01:00
anschrammh
60cf47b142 Added the state of the FreeRTOS stack (free heap/total heap) 2023-03-14 07:32:27 +01:00
anschrammh
66a3c87131 Renamed some file's header guards to be more consistent, clean some useless object in the UI, renamed a watch settings which name could be misleading 2023-03-12 21:44:43 +01:00
anschrammh
6e2a3e88fa Added a battery icon indicating if the watch is charging, charged or if the battery is running low, adde new bluetooth icon, work is still in progress for bluetooth 2023-03-12 21:41:03 +01:00
anschrammh
609b374f4b Finished to design and implement the altimeter/atmoshperic pressure app screen 2023-03-06 20:47:42 +01:00
anschrammh
7e7b93c694 Altimeter screen continued but not finished 2023-02-23 06:22:50 +01:00
1602f01897 Increased application max size in the gcc_csky_bt.ld script as well, added WiFi hotspot scan routine to test antenna 2023-02-19 20:30:04 +01:00
50379bd2a9 Added libs needed with the SDK version 1.00.10 2023-02-19 17:51:03 +01:00
b0f7adb8b5 Merge SDK update into master 2023-02-19 17:14:13 +01:00