APP request: Drink counter #4991
Replies: 1 comment
-
Posted at 2022-07-05 by @gfwilliams Do you specifically want the blood alcohol level in there, or is it just for counting drinks? I am reminded of https://www.youtube.com/watch?v=pETEq-nSQpE though... Posted at 2022-07-05 by Hank Actually both :) Posted at 2022-07-05 by ajkm I always thought that was an odd app on the Pebble - surely it isn't that hard to remember how many drinks one has had in a week? Posted at 2022-07-05 by Hank Hey, this is just for science! Posted at 2022-07-05 by user140377 Hank, how about we do it the other way around. You develop the app and we help you :) Posted at 2022-07-06 by Hank Yeah, well, I am more or less someone who can adjust code. Writing a whole new thing is something I am not that comfortable with.
Posted at 2022-07-06 by user140377 ok, the good news is that already you have seen source code. Lets see if we can help you to create a new app. The most important in development: Do one thing at a time, not all 6 steps you have. I suggest you start with the layout and before that you should have done the following three tutorials: Posted at 2022-07-06 by Mark_M I think an ethanol sensor should be added via BLE. Posted at 2022-07-07 by Hank Looked into the oiginal Pebble sources. BAC calculation seems to be rather straigt forward. Will look into it on the weekend. Posted at 2022-07-07 by Hank Pushed a start template to Posted at 2022-07-07 by Hank Lame question as I don't get the concept of the display buffer.
But having this fillRect to clear the previous written number feels totally wrong. What is the right way to do it? Posted at 2022-07-07 by @gfwilliams
Just use However in an ideal world you might use the Layout library (http://www.espruino.com/Bangle.js+Layout) which would handle the positioning (and erasing of the background) for you - so then it'd all be in the right position on Bangle.js 1 too Posted at 2022-07-07 by Hank Made pretty good progress. If someone wants to review the code for tweaks it would be the right time. Attachments: Posted at 2022-07-07 by user140377 Settings tutorial is here: http://www.espruino.com/Bangle.js+App+Settings Posted at 2022-07-07 by Hank I know how to do that - just no time for now :) . Posted at 2022-07-08 by fewieden @hank on top of Gordon's suggestion with the layout module I would have those suggestions:
that can be shortened to
Posted at 2022-07-08 by Hank To be honest, I get better along without the Layout library :) Posted at 2022-07-09 by Hank The app should now be usable more or less. Thanks for the suggestions. PR pending... I learned ther is no function to invert an image, is there? Posted at 2022-07-10 by fewieden @hank if your icon is using 1 or 2bpp then you can style it by setting the FG and BG colors before rendering, see http://forum.espruino.com/conversations/377280/#comment16583897 Posted at 2022-07-10 by Hank Seems to be working fine. Thanks a lot! Posted at 2022-07-11 by @gfwilliams Merged! Posted at 2022-07-11 by ajkm Ha! Posted at 2022-07-11 by Hank There ya go @ajkm - your new favorite app :) Posted at 2022-07-11 by ajkm Well, I wouldn't go that far - and the number of times I drink in a week, and the number of drinks, can be counted on one hand usually! Posted at 2022-07-11 by user140377 You definitely need to increase your consumption because you must test this app. Posted at 2022-07-11 by Hank It saves state now. So you could count the drinks per year... Posted at 2022-07-11 by ajkm Well there's that, I suppose! Posted at 2022-07-12 by nicoboss Any chance your scientific App could work with the Bangle.JS 1 ? Posted at 2022-07-12 by Hank I really have to damit that I am too lazy to adopt it. The navigation concept I chose really needs a touch screen or 5 buttons. If someone is willing to work on that, please let me know :) Posted at 2022-07-12 by nicoboss In fact, currently, the Bangle1 has 3 buttons and a two part touch screen (which can be extended to 3), left part and right part (the third being the middle if we consider a touch of both parts simultaneously). So the number of buttons/touches required could probably be satisfactory. I don't have the programming skills to do this portability, but I'm sure many here do, so maybe your scientific application will see the light of day on the Bangle1 :) Posted at 2022-07-12 by Hank What current BJS1 app features all 5 Buttons to navigate? Maybe I can borrow some code for science... Posted at 2022-07-12 by Hank Found a way - PR pending: Difference to BJS2 is that if all drinks are 0, it asks for reset because button 2 is needed to exit the app. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2022-07-05 by Hank
The only app that I now really miss from my Pebble is the Drink Counter:
https://www.reddit.com/r/pebble/comments/304ol2/app_drink_counter_preview_for_pebble_time/
Does anyone have the time to work on this? I might be willing to help, but time and skills are limited :)
Beta Was this translation helpful? Give feedback.
All reactions