senseshift / senseshift-firmware

Open-source firmware for VR accessories. Build your own DIY haptic vest, gloves, and more!
https://senseshift.github.io/
GNU General Public License v3.0
98 stars 10 forks source link

Bug: Battery level is not show in PlayerBhaptic app #121

Open walterleonardo opened 3 months ago

walterleonardo commented 3 months ago

Details

Appear like 0 the battery level.

walterleonardo commented 3 months ago
**** Failed to open the serial port /dev/tty.SLAB_USBtoUART ****
---- Opened the serial port /dev/tty.SLAB_USBtoUART ----
l 29 2019 1[    15][I][esp32-hal-i2c.c:75] i2cInit(): Initialising I2C Master: sda=21 scl=22 freq=100000
[    52][W][Wire.cpp:301] begin(): Bus already started in Master Mode.
[    76][W][Wire.cpp:301] begin(): Bus already started in Master Mode.
[   100][W][Wire.cpp:301] begin(): Bus already started in Master Mode.
[   124][W][Wire.cpp:301] begin(): Bus already started in Master Mode.
[   148][W][Wire.cpp:301] begin(): Bus already started in Master Mode.
[   172][W][Wire.cpp:301] begin(): Bus already started in Master Mode.
[   196][W][Wire.cpp:301] begin(): Bus already started in Master Mode.
[   220][W][Wire.cpp:301] begin(): Bus already started in Master Mode.
[   244][W][Wire.cpp:301] begin(): Bus already started in Master Mode.
[   268][W][Wire.cpp:301] begin(): Bus already started in Master Mode.
[   292][W][Wire.cpp:301] begin(): Bus already started in Master Mode.
[   316][W][Wire.cpp:301] begin(): Bus already started in Master Mode.
[   340][W][Wire.cpp:301] begin(): Bus already started in Master Mode.
[   364][W][Wire.cpp:301] begin(): Bus already started in Master Mode.
[   388][W][Wire.cpp:301] begin(): Bus already started in Master Mode.
[   412][W][Wire.cpp:301] begin(): Bus already started in Master Mode.
[  1184][I][BLEDevice.cpp:577] getAdvertising(): create advertising
[  1208][I][task.hpp:49] Task(): creating ComponentUpdateTask: ADC Battery
[  1215][I][task.hpp:129] ComponentUpdateTask(): creating ComponentUpdateTask: ADC Battery
[  1226][I][task.hpp:72] begin(): Created task ADC Battery, result 1
[  3391][I][senseshift.cpp:21] postEvent(): [application] Event dispatched at 3391: connected (0x3ffc8164)
[  3784][I][BLEDevice.cpp:253] gapEventHandler(): ESP_GAP_BLE_AUTH_CMPL_EVT
[ 11227][I][senseshift.cpp:21] postEvent(): [application] Event dispatched at 11227: battery_level (0x3ffc818c)
[ 21226][I][senseshift.cpp:21] postEvent(): [application] Event dispatched at 21226: battery_level (0x3ffc818c)
[ 31226][I][senseshift.cpp:21] postEvent(): [application] Event dispatched at 31226: battery_level (0x3ffc818c)
---- Closed the serial port /dev/tty.SLAB_USBtoUART ----
sweep-ai[bot] commented 3 months ago
Sweeping

0%

Actions

Thank you for reporting this issue with the battery level displaying as 0 in the PlayerBhaptic app. To help the development team investigate and resolve this, could you please provide some additional details:

  1. What are the steps to reproduce this issue? What specific actions do you take in the app to see the 0 battery level?
  2. Could you attach a screenshot showing where you see the 0 battery level in the app's interface?
  3. What would you expect the battery level to display as when it is working correctly?
  4. What type of device, operating system version, and PlayerBhaptic app version are you using where you encounter this issue?

These extra details will help pinpoint the cause of the problem so it can be fixed properly. Please let me know if you have any other questions!

Report a bug.


[!TIP] To recreate the pull request, edit the issue title or description.

This is an automated message generated by Sweep AI.

walterleonardo commented 3 months ago

IMG_6995

leon0399 commented 3 months ago

@walterleonardo please share what hardware you use for battery management and how it is connected.

walterleonardo commented 3 months ago

https://github.com/senseshift/senseshift-hardware/tree/main/Devices/X16%20Vest/ESP32%20+%20PCA9685 https://github.com/senseshift/senseshift-hardware/tree/main/Devices/X16%20Vest/ESP32%20+%20Integrated%20PWM

I have these two prototypes. And in both I have the same issue. with the last version 0.7.0.rc1 main and develop branch

leon0399 commented 3 months ago

Sorry for the inconvenience. Unfortunately, web-flashed firmware and Diagrams now use different ways to measure battery levels. In web-flasher firmware configured to use analog pin 36 with voltage divider 37k and 100k ohms The MAX1704* circuit in the diagram is missing in the 0.7.0 release candidates.

Unfortunately, until I re-implement this chip, you will either: 1) use 0.6.0 and modify some code with PlatformIO IDE to use MAX1704* chip 2) modify hardware to use a voltage divider

I can help you with the code if you want