Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Build request] Build with apps such as SleepTk and more #407

Open
tiPrans opened this issue Mar 12, 2023 · 21 comments
Open

[Build request] Build with apps such as SleepTk and more #407

tiPrans opened this issue Mar 12, 2023 · 21 comments
Labels
question User question

Comments

@tiPrans
Copy link

tiPrans commented Mar 12, 2023

Hey everyone, apologies in advance for the dummy request! But would it be possible to provide the micropython.zip file of an os build containing some of the useful apps such as SleepTk, morse, music player and calculator? I've read through the documentation but couldn't build the os myself and couldn't find anywhere else to ask. Again, apologies for the dummy request!

@GaryM0101
Copy link
Contributor

GaryM0101 commented Mar 14, 2023

Here is my build FWIW, note I'm running an older version of SleepTk (December 2022) as the "get" and "set" Python methods are waiting for WASP-OS promotion and the current new version of SleepTk will not run with the latest core WASP-OS. Also I excluded several phone apps that I don't use, Music Player and Weather and others. Morse and Calculator are in the build.
Cheers,
Gary

micropython.zip

@tiPrans
Copy link
Author

tiPrans commented Mar 14, 2023

Thank you very much! However, I don't seem to be able to see Morse app in there. But SleepTk is in!

@GaryM0101
Copy link
Contributor

GaryM0101 commented Mar 14, 2023

Sorry, yes morse and other larger applications like Level and Beacon are loaded via the wasptool onto the extended memory of the watch and are not included in the micropython.zip flash build. You'd need a Linux like machine and git clone the WASP_OS repository to upload the morse app and configure the local main.py file to run it.

However if on Adroid you could use Serial Bluetooth Terminal to upload it. You can find out all about it here.
https://wasp-os.readthedocs.io/en/latest/install.html

Gary

@fgaz fgaz added the question User question label Mar 14, 2023
@tiPrans
Copy link
Author

tiPrans commented Mar 14, 2023

I see, thanks a lot Gary!

@tiPrans
Copy link
Author

tiPrans commented Mar 22, 2023

hi again @GaryM0101 , I'd still like to upload a version of the OS that has some of my preferred apps. However, I am stuck at the process of compiling the OS and getting the micropython.zip file. I think the official tutorial might be incomplete in this regard. If you have the time, could you please share the steps/code required to get the micropython.zip? Sorry for the dummy request but I'm not sure where else to ask!

@GaryM0101
Copy link
Contributor

GaryM0101 commented Mar 23, 2023

Hello @tiPrans I can build you another one with your preferred apps, note SleepTk has issues with the stepcounter and logging of it so I suggest not including the stepcounter. Let me know your preferred apps and I can build it.

Though if you want to do this on your own and need help, it's better to meetup on Libera.chat https://app.element.io/#/room/#wasp-os:libera.chat

Gary

@tiPrans
Copy link
Author

tiPrans commented Mar 23, 2023

Hey Gary, that's so kind of you to offer building it! Thank you so much! So my preferences would be as follows:

  • If possible, I'd be happy with having Literal clock as the only watch face (but note that the text needs to be translated to English and the font noto48 to be converted from ttf to py). I am attaching the translated version that I tried to work on, so I hope it's functional but I couldn't get the font in py format. Otherwise wordclock could also work.

literal_clock_ENG.zip

  • Apps that I'd still like to have: calculator.py, morse.py, music_player.py, play2048.py, sna
    ke.py, stopwatch.py, timer.py
  • I'd still like to have SleepTk on though as I like the smart alarm feature
  • Also, it might be good to modify the software.py, manifest_240x240.py and/or wasp.py to remove the apps that have been removed to prevent trace back error.

Thank you so much again but if it's too much, that's fine too!

@GaryM0101
Copy link
Contributor

The Literal Clock errors when loading in the simulator:

File "/home/pi/wasp-os/wasp/apps/literal_clock.py", line 90, in update
say = ("", hour[now[3] % 12], "fourty", lows[now[4]])
IndexError: list index out of range

So I used the Word Clock. Everything tested okay on the simulator but no guarantees since the simulator has unlimited memory. The Morse app tested okay too but not sure if it will work being frozen in the firmware.

micropython.zip

Good Luck!
Gary

@tiPrans
Copy link
Author

tiPrans commented Mar 24, 2023

thanks a lot Gary! That's so kind of you! I've tried it on the watch and everything works! I'll try to rework on the Literal Clock and let you know, maybe include the Sports app too if that's not too much to ask.

btw, do you know if there is any to-do or note taking app for wasp-os? thanks!

@GaryM0101
Copy link
Contributor

@tiPrans Good! When you get the Literal Clock going I can make another build with the Sport App included.

As for a note taking app there is no "pull" request in the works but this is Python right? We could certainly write our own... ;-)

Gary

@tiPrans
Copy link
Author

tiPrans commented Mar 30, 2023

Hi @GaryM0101 , would you be able to please try if this version of Literal Clock compiles ok when you have the time? Would it also be possible to please include the Sports and DisaBLE apps? Morse app can be removed if needed. Thanks!
literal_clock_ENG.zip

@tiPrans
Copy link
Author

tiPrans commented Mar 31, 2023

Hey @GaryM0101 sorry for spamming with yet another message but I've reworked the Literal Clock file and should be better. Could you please try to compile it along with the Sports and DisaBLE apps and let me know if there's any errors? Thanks!

literal_clock_ENG.zip

@GaryM0101
Copy link
Contributor

@tiPrans
Looks like you have some more issues with the literal_clock, I tested this in the simulator.

File "/home/pi/wasp-os/wasp/apps/literal_clock.py", line 55, in foreground
self.draw()
File "/home/pi/wasp-os/wasp/apps/literal_clock.py", line 52, in draw
self.update()
File "/home/pi/wasp-os/wasp/apps/literal_clock.py", line 106, in update
self.battery()
File "/home/pi/wasp-os/wasp/apps/literal_clock.py", line 45, in battery
draw.fill(c, 235, 239, 4, h)
File "/home/pi/wasp-os/wasp/draw565.py", line 153, in fill
display.set_window(x, y, w, h)
File "/home/pi/wasp-os/wasp/drivers/st7789.py", line 139, in set_window
window[2] = yp >> 8
TypeError: unsupported operand type(s) for >>: 'float' and 'int'

@tiPrans
Copy link
Author

tiPrans commented Apr 14, 2023

Hey @GaryM0101 , I've spent some time and edited the word_clock.py file which is in the main OS' watch_faces folder. I think this should be less problematic to compile as it uses the default font. Could you please compile an OS with this as the sole watch face, include Sleep.tk, DisaBLE and Sports app (Morse can be removed if needed).

Thanks a lot!

word_clock_MOD.zip

@GaryM0101
Copy link
Contributor

@tiPrans

The word clock compiled and tested okay in the simulator. I kept the other apps you requested before like calculator.py, music_player.py, play2048.py, snake.py, stopwatch.py, timer.py. Sleep.tk, DisaBLE and Sports apps are there.

micropython.zip

@tiPrans
Copy link
Author

tiPrans commented Apr 17, 2023

hey there, thanks a lot for your reply and for providing the compiled OS! I tried installing but after flashing the OS, the screen of the watch is stuck on 'main.py' :/ not sure if you know how to fix it but I'll look into it

@GaryM0101
Copy link
Contributor

I suspect we loaded too many apps and you're running out of memory. I recompiled with only Sleep.tk, DisaBLE and Sports app included. Give that a try and let me know.

micropython.zip

@tiPrans
Copy link
Author

tiPrans commented Apr 21, 2023

thanks! This one loads ok but there's an issue with the Sports app which doesn't seem to work well? Pressing the button when the app is open causes it to crash :/

@thiswillbeyourgithub
Copy link
Contributor

Hi! I'm the dev of SleepTk. I don't know which version of SleepTk you're using but one PR I made a while back has not been accepted so it might be a bit buggy I'm afraid: I made #370 because there are too many alarms and possibilities for me to keep track of it sanely so I prefered to modify wasp.cancel_alarm to be able to catch any matching time.

I'm pretty sure it's the only thing missing in terms of code for SleepTk to be working fine on the master branch.

Btw I have yet to upload the latest version that fixes the natural wake feature which is awesome for my sleep :) I'll try to get to fixing my #351 PR to make it mergeable.

@GaryM0101
Copy link
Contributor

There were a couple of python methods that were not implemented to use the current version, that's why we're using an older version that works with the main branch.

@thiswillbeyourgithub
Copy link
Contributor

I think you're refering to wasp.get and wasp.set. i added a check to call them only if present in wasp. Those methods are in #368 and i hope it gets merged someday.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question User question
Projects
None yet
Development

No branches or pull requests

4 participants