-
Not really after anything. Just saw this chip from TI(2605) that does some fancy haptic effects and just wondering if they were at all useful for a watch.
I've only had one example with this kind of thing on my Samsung s3. I had this meditation app that would have this cool ramp up vibration. The kind of ramp that would be a pain to make in software. But i dont know other cases where I know there was some fancy vibration on my watch.
-
So I actually think I misunderstood that chip for this chip. https://www.ti.com/product/DRV2605
Which has a library of different haptic effects
-
So from what I understand neither the bangle 1 or 2 or any supported bangle device has a haptic driver. But devices like the pebble watch had a haptic driver. https://www.ti.com/lit/ds/symlink/drv2603.pdf?ts=1711575201075
Is there anything that would be useful to have this piece of hardware or is a properly configured pulsed pin perfect for most use cases.
-
-
This is just a theoretical question, but what would be everybody's option on using cmake instead of just make files for the main espruino project.
I asked partly ask this because i would love to see Zephyr support on this project and Zephyr uses CMAKE in its builds. So having a a build system use cmake would make that easier to integrate.
-
-
-
One thing i wanted but couldn't figure out was a way to have just a Bangle_driver_impl.h without a Bangle_driver_impl.C
I wanted this because the file mainly includes empty weak functions file because the whole point is to give the project a place to inject hardware specific code. But because the each bangle_device_driver_impl.c includes the headers of the Bangle_driver_impl.h you can't have the weak pointer definition because then you'll get double declarations error.
-
Look forward to what you have to say.
So i added the display driver layout as well.
https://github.com/brendena/Espruino/tree/MOD_DISPLAY -
@Gordon
So i don't seem to be able to find a used Bangle 1 watch any where. So the next best thing would be to get the same watch model.So i'm wondering if you could send me the full part name for it. I tried to search for f18 but that didn't seemed to turn up anything useful.
-
-
CHANGES
- build EMSCPRTION
- moved state to a separate file called bangle_state.h
- removed most of the EMULATED defines
So to remove most of the EMULATED define i needed all the functions in the XX_impl.h header to be defined just not doing anything. So i just wrap each function definition in a macro that will generate a empty function. Example header how how it used. Then with the EMSCRIPT builds i just don't include the XXX_impl.c files.
Status
So I'm able to build the emscription repo. I just don't see it when run the repo? Currently i won't be able to test with real hardware till next month.
So other then testing i can start working on the display module. Or try to address other concerns that you have.
- build EMSCPRTION
-
-
-
-
I can see that. That's the beauty and problem with coding. Its always changing. haha
So that change is from
3.1.13 - 06/02/2022So I'll look through the change log and see what's changed. Logs
-
-
With the latest build Espruino, EsperuinoWebIDE and EMCC, i'm getting this error when i try to build the Emulator.
error: undefined symbol: emscripten_memcpy_js (referenced by root reference (e.g. compiled C/C++ code))
warning: To disable errors for undefined symbols use-**sERROR_ON_UNDEFINED_SYMBOLS=0**
warning: _emscripten_memcpy_js may need to be added to EXPORTED_FUNCTIONS if it arrives from a system library
Error: Aborting compilation due to previous errors
emcc: error: '/home/brendena/code/newCode/emsdk/node/16.20.0_64bit/bin/node /home/brendena/code/newCode/emsdk/upstream/emscripten/src/compiler.mjs /tmp/tmp54wpsiw5.json' failed (returned 1)NodeJS -v 20 - but i don't know if this matters because EMCC uses its own NodeJS
-
So those week functions are to handle state.
So in the code i just sent the Bangle1 watch needs its backlight to be killed a certain way. But most backlights don't need to be killed at all.There's also a few display drawing calls that are not really supported on other devices other then the bangle1.
If i get to do touch. The bangle1 touch needs no initialization. But the bangle2 does.
There are other examples. I can point out where a specific devices doesn't need a special state, but the group as a hole needs the option to config at a given state.
- idle
- kill
- init
So these empty declarations are there because its not needed for every devices. So each device could have every function declarations inside of them. But they would also just be empty.
If the function is needed, having the build fail if the function isn't defined is probably a good thing?
So i totally agree with this. Its just in these cases these function are not needed in many cases.
- idle
-
Now currently the build is a little ("lot bad"). Partly because there will be a huge influx of .C files that i didn't want to have to list them all. So currently i have a lot of #includes(**.c) files. This will include all the files, but each file will be covered with define to enable or disable it.
In the board file i need to add a line to grab all the hardware specific defines.
- this partly has to be like this. Your soft reference function have to compiled separately from your hard reference function.
Then this grabs all the hardware implemenation files.
I have a #include(**.c) as well in the jswrap_bangle.c.
I'm guessing there's probably a way to handle this in the makefile. Just haven't looked into it yet.
- this partly has to be like this. Your soft reference function have to compiled separately from your hard reference function.
-
So here is where i'm housing the code i'm working on. I haven't fully tested this but it shouldn't be far off from what I'm expecting.
Hardware drivers folder
So this branch is just working on the backlight. One thing you'll notice is i had to move around a decent amount of code. This is because there's so much stuff that's defined inside the "jswrap_bangle.c".
So i'm planning on there being 3 types of files.
- jswrap_bangle_xxxx - hold all the jswrapper function
- banglexxxximpl - will hold the generic implementation. So many function with no definitions
- banglexxxxhandware_name_impl - the device specific funtions
Devices folder
Holds defines and will hold probably some simple setup function.
bangle_defines.h
Which holds all the enums from jswrap_bangle.c
It holds references to the global state of bangle. These are mostly timers and bangleState and flag. - jswrap_bangle_xxxx - hold all the jswrapper function
-
So i see there's the linux_build_bangleJS2, but not one for the bangleJS1.
-
So i want to make changes to BangleJS software and i want to make sure the changes i make don't effect the emulator functionality.
So what I'm curious how does the webIDE link up with the Espruino library. I see there's a webpages for the different bangle watches. I see there is this blob that I'm guessing is the emulator.
So I know i need to build this in Espruino repo and then i guess copy it to this folder?
So i disconnected the battery and i want to program a bangle 1.
Just want to make sure what voltage is the VDD line for swd connection. Is it 3.3v or 5v