Open dhorsler opened 3 years ago
Hello,
Can you send any errors that you received? I have not tried to install on anything newer than what I had in the documentation.
Thanks,
Joel Zeller
On Tue, May 18, 2021, 4:36 AM dhorsler @.***> wrote:
it seems to be particularly hard to get this running with the latest pi updates and kivy version, initially an issue with window orientation as 'vertical' is no longer supported by kivy version 1.10 and above and then an issue with window creation requiring 1 argment not 2 that i've failed to track down as of yet....
any suggestions of how to get this to run on newer kivy version gratefully received.
for the record, have tried kivy1.9 (before the orientation format changes) but that fails dismally to install on pi with latest python updates....
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Joelzeller/DigitalRaceDashSlim/issues/1, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABNXGSCDFOVXNSWA4J72DILTOIRHTANCNFSM45CBP7DQ .
Hi Joel,
thank you very much for taking the time to respond, very much appreciated :-)
The first error is the following:
@.:~ $ cd DRDS
@.:~/DRDS $ sudo python3 main.py
[INFO ] [Logger ] Record log in /root/.kivy/logs/kivy_21-05-18_3.txt
[INFO ] [Kivy ] v2.1.0.dev0
[INFO ] [Kivy ] Installed at
"/usr/local/lib/python3.7/dist-packages/kivy/init.py"
[INFO ] [Python ] v3.7.3 (default, Jan 22 2021, 20:04:44)
[GCC 8.3.0]
[INFO ] [Python ] Interpreter at "/usr/bin/python3"
[INFO ] [Logger ] Purge log fired. Processing...
[INFO ] [Logger ] Purge finished!
[INFO ] [Factory ] 189 symbols loaded
[INFO ] [Image ] Providers: img_tex, img_dds, img_sdl2, img_pil
(img_ffpyplayer ignored)
[INFO ] [Text ] Provider: sdl2
[INFO ] [Window ] Provider: egl_rpi
[INFO ] [GL ] Using the "OpenGL ES 2" graphics system
[INFO ] [GL ] Backend used
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "main.py", line 1008, in
916: orientation: "vertical" 917: size_hint_y: None 918: height: self.minimum_height ... ValueError: GridLayout.orientation is set to an invalid option 'vertical'. Must be one of: ['lr-tb', 'tb-lr', 'rl-tb', 'tb-rl', 'lr-bt', 'bt-lr', 'rl-bt', 'bt-rl'] File "/usr/local/lib/python3.7/dist-packages/kivy/lang/builder.py", line 706, in _apply_rule setattr(widget_set, key, value) File "kivy/weakproxy.pyx", line 35, in kivy.weakproxy.WeakProxy.setattr File "kivy/properties.pyx", line 520, in kivy.properties.Property.set File "kivy/properties.pyx", line 564, in kivy.properties.Property.set File "kivy/properties.pyx", line 555, in kivy.properties.Property.set File "kivy/properties.pyx", line 1354, in kivy.properties.OptionProperty.check
If i change the window orientation issue to one of the allowed enums in main.kv, i then get a different error:
[INFO ] [HIDMotionEvent] using <Chicony 2.4G Multimedia Wireless Kit>
Traceback (most recent call last):
File "main.py", line 1008, in
Any suggestions you have would be very much greatfully received..., my plan was to change the input source from generic OBDII to a custom wirten UK Rover cars MEMS2J serial stream to connect to a UK Rover Mini, probably ambitious but hey, you don't know if you don't try....
best regards, Dave Horsler.
On Tue, 18 May 2021 at 14:03, Joel Zeller @.***> wrote:
Hello,
Can you send any errors that you received? I have not tried to install on anything newer than what I had in the documentation.
Thanks,
Joel Zeller
On Tue, May 18, 2021, 4:36 AM dhorsler @.***> wrote:
it seems to be particularly hard to get this running with the latest pi updates and kivy version, initially an issue with window orientation as 'vertical' is no longer supported by kivy version 1.10 and above and then an issue with window creation requiring 1 argment not 2 that i've failed to track down as of yet....
any suggestions of how to get this to run on newer kivy version gratefully received.
for the record, have tried kivy1.9 (before the orientation format changes) but that fails dismally to install on pi with latest python updates....
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Joelzeller/DigitalRaceDashSlim/issues/1, or unsubscribe < https://github.com/notifications/unsubscribe-auth/ABNXGSCDFOVXNSWA4J72DILTOIRHTANCNFSM45CBP7DQ
.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Joelzeller/DigitalRaceDashSlim/issues/1#issuecomment-843152072, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANL4FZWZ2IO7J3MPCM7DMNLTOJQRLANCNFSM45CBP7DQ .
Forgot to add, its running on a Pi 3 just in case that's important, thanks
On Tue, 18 May 2021 at 14:32, David Horsler @.***> wrote:
Hi Joel,
thank you very much for taking the time to respond, very much appreciated :-)
The first error is the following:
@.:~ $ cd DRDS @.:~/DRDS $ sudo python3 main.py [INFO ] [Logger ] Record log in /root/.kivy/logs/kivy_21-05-18_3.txt [INFO ] [Kivy ] v2.1.0.dev0 [INFO ] [Kivy ] Installed at "/usr/local/lib/python3.7/dist-packages/kivy/init.py" [INFO ] [Python ] v3.7.3 (default, Jan 22 2021, 20:04:44) [GCC 8.3.0] [INFO ] [Python ] Interpreter at "/usr/bin/python3" [INFO ] [Logger ] Purge log fired. Processing... [INFO ] [Logger ] Purge finished! [INFO ] [Factory ] 189 symbols loaded [INFO ] [Image ] Providers: img_tex, img_dds, img_sdl2, img_pil (img_ffpyplayer ignored) [INFO ] [Text ] Provider: sdl2 [INFO ] [Window ] Provider: egl_rpi [INFO ] [GL ] Using the "OpenGL ES 2" graphics system [INFO ] [GL ] Backend used
[INFO ] [GL ] OpenGL version <b'OpenGL ES 2.0'> [INFO ] [GL ] OpenGL vendor <b'Broadcom'> [INFO ] [GL ] OpenGL renderer <b'VideoCore IV HW'> [INFO ] [GL ] OpenGL parsed version: 2, 0 [INFO ] [GL ] Shading version <b'OpenGL ES GLSL ES 1.00'> [INFO ] [GL ] Texture max size <2048> [INFO ] [GL ] Texture max units <8> [INFO ] [Window ] virtual keyboard not allowed, single mode, not docked This is not being run on a Raspberry Pi. Functionality is limited. [INFO ] [GL ] NPOT texture support is available Traceback (most recent call last): File "/usr/local/lib/python3.7/dist-packages/kivy/lang/builder.py", line 706, in _apply_rule setattr(widget_set, key, value) File "kivy/weakproxy.pyx", line 35, in kivy.weakproxy.WeakProxy.setattr File "kivy/properties.pyx", line 520, in kivy.properties.Property.set File "kivy/properties.pyx", line 564, in kivy.properties.Property.set File "kivy/properties.pyx", line 555, in kivy.properties.Property.set File "kivy/properties.pyx", line 1354, in kivy.properties.OptionProperty.check ValueError: GridLayout.orientation is set to an invalid option 'vertical'. Must be one of: ['lr-tb', 'tb-lr', 'rl-tb', 'tb-rl', 'lr-bt', 'bt-lr', 'rl-bt', 'bt-rl'] During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "main.py", line 1008, in
MainApp().run() File "/usr/local/lib/python3.7/dist-packages/kivy/app.py", line 954, in run self._run_prepare() File "/usr/local/lib/python3.7/dist-packages/kivy/app.py", line 923, in _run_prepare self.load_kv(filename=self.kv_file) File "/usr/local/lib/python3.7/dist-packages/kivy/app.py", line 696, in load_kv root = Builder.load_file(rfilename) File "/usr/local/lib/python3.7/dist-packages/kivy/lang/builder.py", line 307, in load_file return self.load_string(data, **kwargs) File "/usr/local/lib/python3.7/dist-packages/kivy/lang/builder.py", line 411, in load_string rule_children=rule_children) File "/usr/local/lib/python3.7/dist-packages/kivy/lang/builder.py", line 713, in _apply_rule e), cause=tb) kivy.lang.builder.BuilderException: Parser: File "/home/pi/DRDS/main.kv", line 916: ... 914: do_scroll_y: True 915: GridLayout: # Can handle 10 DTCs for now 916: orientation: "vertical" 917: size_hint_y: None 918: height: self.minimum_height ... ValueError: GridLayout.orientation is set to an invalid option 'vertical'. Must be one of: ['lr-tb', 'tb-lr', 'rl-tb', 'tb-rl', 'lr-bt', 'bt-lr', 'rl-bt', 'bt-rl'] File "/usr/local/lib/python3.7/dist-packages/kivy/lang/builder.py", line 706, in _apply_rule setattr(widget_set, key, value) File "kivy/weakproxy.pyx", line 35, in kivy.weakproxy.WeakProxy.setattr File "kivy/properties.pyx", line 520, in kivy.properties.Property.set File "kivy/properties.pyx", line 564, in kivy.properties.Property.set File "kivy/properties.pyx", line 555, in kivy.properties.Property.set File "kivy/properties.pyx", line 1354, in kivy.properties.OptionProperty.check
If i change the window orientation issue to one of the allowed enums in main.kv, i then get a different error:
[INFO ] [HIDMotionEvent] using <Chicony 2.4G Multimedia Wireless Kit> Traceback (most recent call last): File "main.py", line 1008, in
MainApp().run() File "/usr/local/lib/python3.7/dist-packages/kivy/app.py", line 955, in run runTouchApp() File "/usr/local/lib/python3.7/dist-packages/kivy/base.py", line 596, in runTouchApp EventLoop.mainloop() File "/usr/local/lib/python3.7/dist-packages/kivy/base.py", line 361, in mainloop self.idle() File "/usr/local/lib/python3.7/dist-packages/kivy/base.py", line 401, in idle Clock.tick() File "/usr/local/lib/python3.7/dist-packages/kivy/clock.py", line 733, in tick self.post_idle(ts, self.idle()) File "/usr/local/lib/python3.7/dist-packages/kivy/clock.py", line 776, in post_idle self._process_events() File "kivy/_clock.pyx", line 616, in kivy._clock.CyClockBase._process_events File "kivy/_clock.pyx", line 649, in kivy._clock.CyClockBase._process_events File "kivy/_clock.pyx", line 645, in kivy._clock.CyClockBase._process_events File "kivy/_clock.pyx", line 218, in kivy._clock.ClockEvent.tick TypeError: create_window() takes 1 positional argument but 2 were given Any suggestions you have would be very much greatfully received..., my plan was to change the input source from generic OBDII to a custom wirten UK Rover cars MEMS2J serial stream to connect to a UK Rover Mini, probably ambitious but hey, you don't know if you don't try....
best regards, Dave Horsler.
On Tue, 18 May 2021 at 14:03, Joel Zeller @.***> wrote:
Hello,
Can you send any errors that you received? I have not tried to install on anything newer than what I had in the documentation.
Thanks,
Joel Zeller
On Tue, May 18, 2021, 4:36 AM dhorsler @.***> wrote:
it seems to be particularly hard to get this running with the latest pi updates and kivy version, initially an issue with window orientation as 'vertical' is no longer supported by kivy version 1.10 and above and then an issue with window creation requiring 1 argment not 2 that i've failed to track down as of yet....
any suggestions of how to get this to run on newer kivy version gratefully received.
for the record, have tried kivy1.9 (before the orientation format changes) but that fails dismally to install on pi with latest python updates....
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Joelzeller/DigitalRaceDashSlim/issues/1, or unsubscribe < https://github.com/notifications/unsubscribe-auth/ABNXGSCDFOVXNSWA4J72DILTOIRHTANCNFSM45CBP7DQ
.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Joelzeller/DigitalRaceDashSlim/issues/1#issuecomment-843152072, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANL4FZWZ2IO7J3MPCM7DMNLTOJQRLANCNFSM45CBP7DQ .
Hey Dave,
Another option would be to try and install kivy 1.11.0
You could try to port it over to kivy 2.0, but I literally didn't know it existed until today when you reached out...
Best advice I can give if you want to stick with 2.0 is to reach the changelog info and see what might be causing the errors and fix then one by one.
I'd love to take a crack at it, but I've been very busy with other projects lately...
If you get 2.0 working, please let me know and I can update the code on GitHub for others!
Good luck sir,
Joel Zeller
On Tue, May 18, 2021, 9:33 AM dhorsler @.***> wrote:
Hi Joel,
thank you very much for taking the time to respond, very much appreciated :-)
The first error is the following:
@.:~ $ cd DRDS @.:~/DRDS $ sudo python3 main.py [INFO ] [Logger ] Record log in /root/.kivy/logs/kivy_21-05-18_3.txt [INFO ] [Kivy ] v2.1.0.dev0 [INFO ] [Kivy ] Installed at "/usr/local/lib/python3.7/dist-packages/kivy/init.py" [INFO ] [Python ] v3.7.3 (default, Jan 22 2021, 20:04:44) [GCC 8.3.0] [INFO ] [Python ] Interpreter at "/usr/bin/python3" [INFO ] [Logger ] Purge log fired. Processing... [INFO ] [Logger ] Purge finished! [INFO ] [Factory ] 189 symbols loaded [INFO ] [Image ] Providers: img_tex, img_dds, img_sdl2, img_pil (img_ffpyplayer ignored) [INFO ] [Text ] Provider: sdl2 [INFO ] [Window ] Provider: egl_rpi [INFO ] [GL ] Using the "OpenGL ES 2" graphics system [INFO ] [GL ] Backend used
[INFO ] [GL ] OpenGL version <b'OpenGL ES 2.0'> [INFO ] [GL ] OpenGL vendor <b'Broadcom'> [INFO ] [GL ] OpenGL renderer <b'VideoCore IV HW'> [INFO ] [GL ] OpenGL parsed version: 2, 0 [INFO ] [GL ] Shading version <b'OpenGL ES GLSL ES 1.00'> [INFO ] [GL ] Texture max size <2048> [INFO ] [GL ] Texture max units <8> [INFO ] [Window ] virtual keyboard not allowed, single mode, not docked This is not being run on a Raspberry Pi. Functionality is limited. [INFO ] [GL ] NPOT texture support is available Traceback (most recent call last): File "/usr/local/lib/python3.7/dist-packages/kivy/lang/builder.py", line 706, in _apply_rule setattr(widget_set, key, value) File "kivy/weakproxy.pyx", line 35, in kivy.weakproxy.WeakProxy.setattr File "kivy/properties.pyx", line 520, in kivy.properties.Property.set File "kivy/properties.pyx", line 564, in kivy.properties.Property.set File "kivy/properties.pyx", line 555, in kivy.properties.Property.set File "kivy/properties.pyx", line 1354, in kivy.properties.OptionProperty.check ValueError: GridLayout.orientation is set to an invalid option 'vertical'. Must be one of: ['lr-tb', 'tb-lr', 'rl-tb', 'tb-rl', 'lr-bt', 'bt-lr', 'rl-bt', 'bt-rl'] During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "main.py", line 1008, in
MainApp().run() File "/usr/local/lib/python3.7/dist-packages/kivy/app.py", line 954, in run self._run_prepare() File "/usr/local/lib/python3.7/dist-packages/kivy/app.py", line 923, in _run_prepare self.load_kv(filename=self.kv_file) File "/usr/local/lib/python3.7/dist-packages/kivy/app.py", line 696, in load_kv root = Builder.load_file(rfilename) File "/usr/local/lib/python3.7/dist-packages/kivy/lang/builder.py", line 307, in load_file return self.load_string(data, **kwargs) File "/usr/local/lib/python3.7/dist-packages/kivy/lang/builder.py", line 411, in load_string rule_children=rule_children) File "/usr/local/lib/python3.7/dist-packages/kivy/lang/builder.py", line 713, in _apply_rule e), cause=tb) kivy.lang.builder.BuilderException: Parser: File "/home/pi/DRDS/main.kv", line 916: ... 914: do_scroll_y: True 915: GridLayout: # Can handle 10 DTCs for now 916: orientation: "vertical" 917: size_hint_y: None 918: height: self.minimum_height ... ValueError: GridLayout.orientation is set to an invalid option 'vertical'. Must be one of: ['lr-tb', 'tb-lr', 'rl-tb', 'tb-rl', 'lr-bt', 'bt-lr', 'rl-bt', 'bt-rl'] File "/usr/local/lib/python3.7/dist-packages/kivy/lang/builder.py", line 706, in _apply_rule setattr(widget_set, key, value) File "kivy/weakproxy.pyx", line 35, in kivy.weakproxy.WeakProxy.setattr File "kivy/properties.pyx", line 520, in kivy.properties.Property.set File "kivy/properties.pyx", line 564, in kivy.properties.Property.set File "kivy/properties.pyx", line 555, in kivy.properties.Property.set File "kivy/properties.pyx", line 1354, in kivy.properties.OptionProperty.check
If i change the window orientation issue to one of the allowed enums in main.kv, i then get a different error:
[INFO ] [HIDMotionEvent] using <Chicony 2.4G Multimedia Wireless Kit> Traceback (most recent call last): File "main.py", line 1008, in
MainApp().run() File "/usr/local/lib/python3.7/dist-packages/kivy/app.py", line 955, in run runTouchApp() File "/usr/local/lib/python3.7/dist-packages/kivy/base.py", line 596, in runTouchApp EventLoop.mainloop() File "/usr/local/lib/python3.7/dist-packages/kivy/base.py", line 361, in mainloop self.idle() File "/usr/local/lib/python3.7/dist-packages/kivy/base.py", line 401, in idle Clock.tick() File "/usr/local/lib/python3.7/dist-packages/kivy/clock.py", line 733, in tick self.post_idle(ts, self.idle()) File "/usr/local/lib/python3.7/dist-packages/kivy/clock.py", line 776, in post_idle self._process_events() File "kivy/_clock.pyx", line 616, in kivy._clock.CyClockBase._process_events File "kivy/_clock.pyx", line 649, in kivy._clock.CyClockBase._process_events File "kivy/_clock.pyx", line 645, in kivy._clock.CyClockBase._process_events File "kivy/_clock.pyx", line 218, in kivy._clock.ClockEvent.tick TypeError: create_window() takes 1 positional argument but 2 were given Any suggestions you have would be very much greatfully received..., my plan was to change the input source from generic OBDII to a custom wirten UK Rover cars MEMS2J serial stream to connect to a UK Rover Mini, probably ambitious but hey, you don't know if you don't try....
best regards, Dave Horsler.
On Tue, 18 May 2021 at 14:03, Joel Zeller @.***> wrote:
Hello,
Can you send any errors that you received? I have not tried to install on anything newer than what I had in the documentation.
Thanks,
Joel Zeller
On Tue, May 18, 2021, 4:36 AM dhorsler @.***> wrote:
it seems to be particularly hard to get this running with the latest pi updates and kivy version, initially an issue with window orientation as 'vertical' is no longer supported by kivy version 1.10 and above and then an issue with window creation requiring 1 argment not 2 that i've failed to track down as of yet....
any suggestions of how to get this to run on newer kivy version gratefully received.
for the record, have tried kivy1.9 (before the orientation format changes) but that fails dismally to install on pi with latest python updates....
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Joelzeller/DigitalRaceDashSlim/issues/1, or unsubscribe <
https://github.com/notifications/unsubscribe-auth/ABNXGSCDFOVXNSWA4J72DILTOIRHTANCNFSM45CBP7DQ
.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub < https://github.com/Joelzeller/DigitalRaceDashSlim/issues/1#issuecomment-843152072 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/ANL4FZWZ2IO7J3MPCM7DMNLTOJQRLANCNFSM45CBP7DQ
.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Joelzeller/DigitalRaceDashSlim/issues/1#issuecomment-843175428, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABNXGSDRSMLODWJU4RTLFO3TOJUCBANCNFSM45CBP7DQ .
Hi Joel,
I've already tried earlier Kivy versions with no success, it seems something else in the latest raspbian/python prevents an earlier version from installing properly, then i lost interest ha ha
I'll have another go at porting to Kivy V2, but i know squat about kivy to be fair, the pi only comes out every now and again when i actually think of something to do with it and by then i've completely forgotten how to build anything for it lol.
If i make any progress i'll let you know ....
best regards, Dave
On Tue, 18 May 2021 at 14:48, Joel Zeller @.***> wrote:
Hey Dave,
Another option would be to try and install kivy 1.11.0
You could try to port it over to kivy 2.0, but I literally didn't know it existed until today when you reached out...
Best advice I can give if you want to stick with 2.0 is to reach the changelog info and see what might be causing the errors and fix then one by one.
I'd love to take a crack at it, but I've been very busy with other projects lately...
If you get 2.0 working, please let me know and I can update the code on GitHub for others!
Good luck sir,
Joel Zeller
On Tue, May 18, 2021, 9:33 AM dhorsler @.***> wrote:
Hi Joel,
thank you very much for taking the time to respond, very much appreciated :-)
The first error is the following:
@.:~ $ cd DRDS @.:~/DRDS $ sudo python3 main.py [INFO ] [Logger ] Record log in /root/.kivy/logs/kivy_21-05-18_3.txt [INFO ] [Kivy ] v2.1.0.dev0 [INFO ] [Kivy ] Installed at "/usr/local/lib/python3.7/dist-packages/kivy/init.py" [INFO ] [Python ] v3.7.3 (default, Jan 22 2021, 20:04:44) [GCC 8.3.0] [INFO ] [Python ] Interpreter at "/usr/bin/python3" [INFO ] [Logger ] Purge log fired. Processing... [INFO ] [Logger ] Purge finished! [INFO ] [Factory ] 189 symbols loaded [INFO ] [Image ] Providers: img_tex, img_dds, img_sdl2, img_pil (img_ffpyplayer ignored) [INFO ] [Text ] Provider: sdl2 [INFO ] [Window ] Provider: egl_rpi [INFO ] [GL ] Using the "OpenGL ES 2" graphics system [INFO ] [GL ] Backend used
[INFO ] [GL ] OpenGL version <b'OpenGL ES 2.0'> [INFO ] [GL ] OpenGL vendor <b'Broadcom'> [INFO ] [GL ] OpenGL renderer <b'VideoCore IV HW'> [INFO ] [GL ] OpenGL parsed version: 2, 0 [INFO ] [GL ] Shading version <b'OpenGL ES GLSL ES 1.00'> [INFO ] [GL ] Texture max size <2048> [INFO ] [GL ] Texture max units <8> [INFO ] [Window ] virtual keyboard not allowed, single mode, not docked This is not being run on a Raspberry Pi. Functionality is limited. [INFO ] [GL ] NPOT texture support is available Traceback (most recent call last): File "/usr/local/lib/python3.7/dist-packages/kivy/lang/builder.py", line 706, in _apply_rule setattr(widget_set, key, value) File "kivy/weakproxy.pyx", line 35, in kivy.weakproxy.WeakProxy.setattr File "kivy/properties.pyx", line 520, in kivy.properties.Property.set File "kivy/properties.pyx", line 564, in kivy.properties.Property.set File "kivy/properties.pyx", line 555, in kivy.properties.Property.set File "kivy/properties.pyx", line 1354, in kivy.properties.OptionProperty.check ValueError: GridLayout.orientation is set to an invalid option 'vertical'. Must be one of: ['lr-tb', 'tb-lr', 'rl-tb', 'tb-rl', 'lr-bt', 'bt-lr', 'rl-bt', 'bt-rl'] During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "main.py", line 1008, in
MainApp().run() File "/usr/local/lib/python3.7/dist-packages/kivy/app.py", line 954, in run self._run_prepare() File "/usr/local/lib/python3.7/dist-packages/kivy/app.py", line 923, in _run_prepare self.load_kv(filename=self.kv_file) File "/usr/local/lib/python3.7/dist-packages/kivy/app.py", line 696, in load_kv root = Builder.load_file(rfilename) File "/usr/local/lib/python3.7/dist-packages/kivy/lang/builder.py", line 307, in load_file return self.load_string(data, **kwargs) File "/usr/local/lib/python3.7/dist-packages/kivy/lang/builder.py", line 411, in load_string rule_children=rule_children) File "/usr/local/lib/python3.7/dist-packages/kivy/lang/builder.py", line 713, in _apply_rule e), cause=tb) kivy.lang.builder.BuilderException: Parser: File "/home/pi/DRDS/main.kv", line 916: ... 914: do_scroll_y: True 915: GridLayout: # Can handle 10 DTCs for now 916: orientation: "vertical" 917: size_hint_y: None 918: height: self.minimum_height ... ValueError: GridLayout.orientation is set to an invalid option 'vertical'. Must be one of: ['lr-tb', 'tb-lr', 'rl-tb', 'tb-rl', 'lr-bt', 'bt-lr', 'rl-bt', 'bt-rl'] File "/usr/local/lib/python3.7/dist-packages/kivy/lang/builder.py", line 706, in _apply_rule setattr(widget_set, key, value) File "kivy/weakproxy.pyx", line 35, in kivy.weakproxy.WeakProxy.setattr File "kivy/properties.pyx", line 520, in kivy.properties.Property.set File "kivy/properties.pyx", line 564, in kivy.properties.Property.set File "kivy/properties.pyx", line 555, in kivy.properties.Property.set File "kivy/properties.pyx", line 1354, in kivy.properties.OptionProperty.check
If i change the window orientation issue to one of the allowed enums in main.kv, i then get a different error:
[INFO ] [HIDMotionEvent] using <Chicony 2.4G Multimedia Wireless Kit> Traceback (most recent call last): File "main.py", line 1008, in
MainApp().run() File "/usr/local/lib/python3.7/dist-packages/kivy/app.py", line 955, in run runTouchApp() File "/usr/local/lib/python3.7/dist-packages/kivy/base.py", line 596, in runTouchApp EventLoop.mainloop() File "/usr/local/lib/python3.7/dist-packages/kivy/base.py", line 361, in mainloop self.idle() File "/usr/local/lib/python3.7/dist-packages/kivy/base.py", line 401, in idle Clock.tick() File "/usr/local/lib/python3.7/dist-packages/kivy/clock.py", line 733, in tick self.post_idle(ts, self.idle()) File "/usr/local/lib/python3.7/dist-packages/kivy/clock.py", line 776, in post_idle self._process_events() File "kivy/_clock.pyx", line 616, in kivy._clock.CyClockBase._process_events File "kivy/_clock.pyx", line 649, in kivy._clock.CyClockBase._process_events File "kivy/_clock.pyx", line 645, in kivy._clock.CyClockBase._process_events File "kivy/_clock.pyx", line 218, in kivy._clock.ClockEvent.tick TypeError: create_window() takes 1 positional argument but 2 were given Any suggestions you have would be very much greatfully received..., my plan was to change the input source from generic OBDII to a custom wirten UK Rover cars MEMS2J serial stream to connect to a UK Rover Mini, probably ambitious but hey, you don't know if you don't try....
best regards, Dave Horsler.
On Tue, 18 May 2021 at 14:03, Joel Zeller @.***> wrote:
Hello,
Can you send any errors that you received? I have not tried to install on anything newer than what I had in the documentation.
Thanks,
Joel Zeller
On Tue, May 18, 2021, 4:36 AM dhorsler @.***> wrote:
it seems to be particularly hard to get this running with the latest pi updates and kivy version, initially an issue with window orientation as 'vertical' is no longer supported by kivy version 1.10 and above and then an issue with window creation requiring 1 argment not 2 that i've failed to track down as of yet....
any suggestions of how to get this to run on newer kivy version gratefully received.
for the record, have tried kivy1.9 (before the orientation format changes) but that fails dismally to install on pi with latest python updates....
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Joelzeller/DigitalRaceDashSlim/issues/1, or unsubscribe <
https://github.com/notifications/unsubscribe-auth/ABNXGSCDFOVXNSWA4J72DILTOIRHTANCNFSM45CBP7DQ
.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub <
https://github.com/Joelzeller/DigitalRaceDashSlim/issues/1#issuecomment-843152072
, or unsubscribe <
https://github.com/notifications/unsubscribe-auth/ANL4FZWZ2IO7J3MPCM7DMNLTOJQRLANCNFSM45CBP7DQ
.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub < https://github.com/Joelzeller/DigitalRaceDashSlim/issues/1#issuecomment-843175428 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/ABNXGSDRSMLODWJU4RTLFO3TOJUCBANCNFSM45CBP7DQ
.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Joelzeller/DigitalRaceDashSlim/issues/1#issuecomment-843187322, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANL4FZU7CGZYTMQ6BDVITTDTOJV33ANCNFSM45CBP7DQ .
Hi Joel,
it seems that there is a known bug in Raspberry Pi that causes this create_window error issue in Kivy.
if you comment out the line 'Window.Size = (800,400)' in main.py, the issue is resolved, or at least it no longer generates the error msg and proceeds to run.
it now boots to a blank white screen, which is progress none the less ha ha, presumably it should show some gauges or something?
i don't have it connected to a obdii device yet, will try that tomorrow to see if that helps.
the boot log is looking more healthy now though....
best regards, Dave
On Tue, 18 May 2021 at 16:37, David Horsler @.***> wrote:
Hi Joel,
I've already tried earlier Kivy versions with no success, it seems something else in the latest raspbian/python prevents an earlier version from installing properly, then i lost interest ha ha
I'll have another go at porting to Kivy V2, but i know squat about kivy to be fair, the pi only comes out every now and again when i actually think of something to do with it and by then i've completely forgotten how to build anything for it lol.
If i make any progress i'll let you know ....
best regards, Dave
On Tue, 18 May 2021 at 14:48, Joel Zeller @.***> wrote:
Hey Dave,
Another option would be to try and install kivy 1.11.0
You could try to port it over to kivy 2.0, but I literally didn't know it existed until today when you reached out...
Best advice I can give if you want to stick with 2.0 is to reach the changelog info and see what might be causing the errors and fix then one by one.
I'd love to take a crack at it, but I've been very busy with other projects lately...
If you get 2.0 working, please let me know and I can update the code on GitHub for others!
Good luck sir,
Joel Zeller
On Tue, May 18, 2021, 9:33 AM dhorsler @.***> wrote:
Hi Joel,
thank you very much for taking the time to respond, very much appreciated :-)
The first error is the following:
@.:~ $ cd DRDS @.:~/DRDS $ sudo python3 main.py [INFO ] [Logger ] Record log in /root/.kivy/logs/kivy_21-05-18_3.txt [INFO ] [Kivy ] v2.1.0.dev0 [INFO ] [Kivy ] Installed at "/usr/local/lib/python3.7/dist-packages/kivy/init.py" [INFO ] [Python ] v3.7.3 (default, Jan 22 2021, 20:04:44) [GCC 8.3.0] [INFO ] [Python ] Interpreter at "/usr/bin/python3" [INFO ] [Logger ] Purge log fired. Processing... [INFO ] [Logger ] Purge finished! [INFO ] [Factory ] 189 symbols loaded [INFO ] [Image ] Providers: img_tex, img_dds, img_sdl2, img_pil (img_ffpyplayer ignored) [INFO ] [Text ] Provider: sdl2 [INFO ] [Window ] Provider: egl_rpi [INFO ] [GL ] Using the "OpenGL ES 2" graphics system [INFO ] [GL ] Backend used
[INFO ] [GL ] OpenGL version <b'OpenGL ES 2.0'> [INFO ] [GL ] OpenGL vendor <b'Broadcom'> [INFO ] [GL ] OpenGL renderer <b'VideoCore IV HW'> [INFO ] [GL ] OpenGL parsed version: 2, 0 [INFO ] [GL ] Shading version <b'OpenGL ES GLSL ES 1.00'> [INFO ] [GL ] Texture max size <2048> [INFO ] [GL ] Texture max units <8> [INFO ] [Window ] virtual keyboard not allowed, single mode, not docked This is not being run on a Raspberry Pi. Functionality is limited. [INFO ] [GL ] NPOT texture support is available Traceback (most recent call last): File "/usr/local/lib/python3.7/dist-packages/kivy/lang/builder.py", line 706, in _apply_rule setattr(widget_set, key, value) File "kivy/weakproxy.pyx", line 35, in kivy.weakproxy.WeakProxy.setattr File "kivy/properties.pyx", line 520, in kivy.properties.Property.set File "kivy/properties.pyx", line 564, in kivy.properties.Property.set File "kivy/properties.pyx", line 555, in kivy.properties.Property.set File "kivy/properties.pyx", line 1354, in kivy.properties.OptionProperty.check ValueError: GridLayout.orientation is set to an invalid option 'vertical'. Must be one of: ['lr-tb', 'tb-lr', 'rl-tb', 'tb-rl', 'lr-bt', 'bt-lr', 'rl-bt', 'bt-rl'] During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "main.py", line 1008, in
MainApp().run() File "/usr/local/lib/python3.7/dist-packages/kivy/app.py", line 954, in run self._run_prepare() File "/usr/local/lib/python3.7/dist-packages/kivy/app.py", line 923, in _run_prepare self.load_kv(filename=self.kv_file) File "/usr/local/lib/python3.7/dist-packages/kivy/app.py", line 696, in load_kv root = Builder.load_file(rfilename) File "/usr/local/lib/python3.7/dist-packages/kivy/lang/builder.py", line 307, in load_file return self.load_string(data, **kwargs) File "/usr/local/lib/python3.7/dist-packages/kivy/lang/builder.py", line 411, in load_string rule_children=rule_children) File "/usr/local/lib/python3.7/dist-packages/kivy/lang/builder.py", line 713, in _apply_rule e), cause=tb) kivy.lang.builder.BuilderException: Parser: File "/home/pi/DRDS/main.kv", line 916: ... 914: do_scroll_y: True 915: GridLayout: # Can handle 10 DTCs for now 916: orientation: "vertical" 917: size_hint_y: None 918: height: self.minimum_height ... ValueError: GridLayout.orientation is set to an invalid option 'vertical'. Must be one of: ['lr-tb', 'tb-lr', 'rl-tb', 'tb-rl', 'lr-bt', 'bt-lr', 'rl-bt', 'bt-rl'] File "/usr/local/lib/python3.7/dist-packages/kivy/lang/builder.py", line 706, in _apply_rule setattr(widget_set, key, value) File "kivy/weakproxy.pyx", line 35, in kivy.weakproxy.WeakProxy.setattr File "kivy/properties.pyx", line 520, in kivy.properties.Property.set File "kivy/properties.pyx", line 564, in kivy.properties.Property.set File "kivy/properties.pyx", line 555, in kivy.properties.Property.set File "kivy/properties.pyx", line 1354, in kivy.properties.OptionProperty.check
If i change the window orientation issue to one of the allowed enums in main.kv, i then get a different error:
[INFO ] [HIDMotionEvent] using <Chicony 2.4G Multimedia Wireless Kit> Traceback (most recent call last): File "main.py", line 1008, in
MainApp().run() File "/usr/local/lib/python3.7/dist-packages/kivy/app.py", line 955, in run runTouchApp() File "/usr/local/lib/python3.7/dist-packages/kivy/base.py", line 596, in runTouchApp EventLoop.mainloop() File "/usr/local/lib/python3.7/dist-packages/kivy/base.py", line 361, in mainloop self.idle() File "/usr/local/lib/python3.7/dist-packages/kivy/base.py", line 401, in idle Clock.tick() File "/usr/local/lib/python3.7/dist-packages/kivy/clock.py", line 733, in tick self.post_idle(ts, self.idle()) File "/usr/local/lib/python3.7/dist-packages/kivy/clock.py", line 776, in post_idle self._process_events() File "kivy/_clock.pyx", line 616, in kivy._clock.CyClockBase._process_events File "kivy/_clock.pyx", line 649, in kivy._clock.CyClockBase._process_events File "kivy/_clock.pyx", line 645, in kivy._clock.CyClockBase._process_events File "kivy/_clock.pyx", line 218, in kivy._clock.ClockEvent.tick TypeError: create_window() takes 1 positional argument but 2 were given Any suggestions you have would be very much greatfully received..., my plan was to change the input source from generic OBDII to a custom wirten UK Rover cars MEMS2J serial stream to connect to a UK Rover Mini, probably ambitious but hey, you don't know if you don't try....
best regards, Dave Horsler.
On Tue, 18 May 2021 at 14:03, Joel Zeller @.***> wrote:
Hello,
Can you send any errors that you received? I have not tried to install on anything newer than what I had in the documentation.
Thanks,
Joel Zeller
On Tue, May 18, 2021, 4:36 AM dhorsler @.***> wrote:
it seems to be particularly hard to get this running with the latest pi updates and kivy version, initially an issue with window orientation as 'vertical' is no longer supported by kivy version 1.10 and above and then an issue with window creation requiring 1 argment not 2 that i've failed to track down as of yet....
any suggestions of how to get this to run on newer kivy version gratefully received.
for the record, have tried kivy1.9 (before the orientation format changes) but that fails dismally to install on pi with latest python updates....
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Joelzeller/DigitalRaceDashSlim/issues/1, or unsubscribe <
https://github.com/notifications/unsubscribe-auth/ABNXGSCDFOVXNSWA4J72DILTOIRHTANCNFSM45CBP7DQ
.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub <
https://github.com/Joelzeller/DigitalRaceDashSlim/issues/1#issuecomment-843152072
, or unsubscribe <
https://github.com/notifications/unsubscribe-auth/ANL4FZWZ2IO7J3MPCM7DMNLTOJQRLANCNFSM45CBP7DQ
.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub < https://github.com/Joelzeller/DigitalRaceDashSlim/issues/1#issuecomment-843175428 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/ABNXGSDRSMLODWJU4RTLFO3TOJUCBANCNFSM45CBP7DQ
.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Joelzeller/DigitalRaceDashSlim/issues/1#issuecomment-843187322, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANL4FZU7CGZYTMQ6BDVITTDTOJV33ANCNFSM45CBP7DQ .
Great news! Are you loading it up on the Pi to start out?
Did you increase the GPU memory yet? There is an instruction in the documentation to do this. In raspi-config -> Advanced Options -> Memory Split
Change value to 512MB
Thanks,
Joel Zeller
On Tue, May 18, 2021, 6:49 PM dhorsler @.***> wrote:
Hi Joel,
it seems that there is a known bug in Raspberry Pi that causes this create_window error issue in Kivy.
if you comment out the line 'Window.Size = (800,400)' in main.py, the issue is resolved, or at least it no longer generates the error msg and proceeds to run.
it now boots to a blank white screen, which is progress none the less ha ha, presumably it should show some gauges or something?
i don't have it connected to a obdii device yet, will try that tomorrow to see if that helps.
the boot log is looking more healthy now though....
best regards, Dave
On Tue, 18 May 2021 at 16:37, David Horsler @.***> wrote:
Hi Joel,
I've already tried earlier Kivy versions with no success, it seems something else in the latest raspbian/python prevents an earlier version from installing properly, then i lost interest ha ha
I'll have another go at porting to Kivy V2, but i know squat about kivy to be fair, the pi only comes out every now and again when i actually think of something to do with it and by then i've completely forgotten how to build anything for it lol.
If i make any progress i'll let you know ....
best regards, Dave
On Tue, 18 May 2021 at 14:48, Joel Zeller @.***> wrote:
Hey Dave,
Another option would be to try and install kivy 1.11.0
You could try to port it over to kivy 2.0, but I literally didn't know it existed until today when you reached out...
Best advice I can give if you want to stick with 2.0 is to reach the changelog info and see what might be causing the errors and fix then one by one.
I'd love to take a crack at it, but I've been very busy with other projects lately...
If you get 2.0 working, please let me know and I can update the code on GitHub for others!
Good luck sir,
Joel Zeller
On Tue, May 18, 2021, 9:33 AM dhorsler @.***> wrote:
Hi Joel,
thank you very much for taking the time to respond, very much appreciated :-)
The first error is the following:
@.:~ $ cd DRDS @.:~/DRDS $ sudo python3 main.py [INFO ] [Logger ] Record log in /root/.kivy/logs/kivy_21-05-18_3.txt [INFO ] [Kivy ] v2.1.0.dev0 [INFO ] [Kivy ] Installed at "/usr/local/lib/python3.7/dist-packages/kivy/init.py" [INFO ] [Python ] v3.7.3 (default, Jan 22 2021, 20:04:44) [GCC 8.3.0] [INFO ] [Python ] Interpreter at "/usr/bin/python3" [INFO ] [Logger ] Purge log fired. Processing... [INFO ] [Logger ] Purge finished! [INFO ] [Factory ] 189 symbols loaded [INFO ] [Image ] Providers: img_tex, img_dds, img_sdl2, img_pil (img_ffpyplayer ignored) [INFO ] [Text ] Provider: sdl2 [INFO ] [Window ] Provider: egl_rpi [INFO ] [GL ] Using the "OpenGL ES 2" graphics system [INFO ] [GL ] Backend used
[INFO ] [GL ] OpenGL version <b'OpenGL ES 2.0'> [INFO ] [GL ] OpenGL vendor <b'Broadcom'> [INFO ] [GL ] OpenGL renderer <b'VideoCore IV HW'> [INFO ] [GL ] OpenGL parsed version: 2, 0 [INFO ] [GL ] Shading version <b'OpenGL ES GLSL ES 1.00'> [INFO ] [GL ] Texture max size <2048> [INFO ] [GL ] Texture max units <8> [INFO ] [Window ] virtual keyboard not allowed, single mode, not docked This is not being run on a Raspberry Pi. Functionality is limited. [INFO ] [GL ] NPOT texture support is available Traceback (most recent call last): File "/usr/local/lib/python3.7/dist-packages/kivy/lang/builder.py", line 706, in _apply_rule setattr(widget_set, key, value) File "kivy/weakproxy.pyx", line 35, in kivy.weakproxy.WeakProxy.setattr File "kivy/properties.pyx", line 520, in kivy.properties.Property.set File "kivy/properties.pyx", line 564, in kivy.properties.Property.set File "kivy/properties.pyx", line 555, in kivy.properties.Property.set File "kivy/properties.pyx", line 1354, in kivy.properties.OptionProperty.check ValueError: GridLayout.orientation is set to an invalid option 'vertical'. Must be one of: ['lr-tb', 'tb-lr', 'rl-tb', 'tb-rl', 'lr-bt', 'bt-lr', 'rl-bt', 'bt-rl'] During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "main.py", line 1008, in
MainApp().run() File "/usr/local/lib/python3.7/dist-packages/kivy/app.py", line 954, in run self._run_prepare() File "/usr/local/lib/python3.7/dist-packages/kivy/app.py", line 923, in _run_prepare self.load_kv(filename=self.kv_file) File "/usr/local/lib/python3.7/dist-packages/kivy/app.py", line 696, in load_kv root = Builder.load_file(rfilename) File "/usr/local/lib/python3.7/dist-packages/kivy/lang/builder.py", line 307, in load_file return self.load_string(data, **kwargs) File "/usr/local/lib/python3.7/dist-packages/kivy/lang/builder.py", line 411, in load_string rule_children=rule_children) File "/usr/local/lib/python3.7/dist-packages/kivy/lang/builder.py", line 713, in _apply_rule e), cause=tb) kivy.lang.builder.BuilderException: Parser: File "/home/pi/DRDS/main.kv", line 916: ... 914: do_scroll_y: True 915: GridLayout: # Can handle 10 DTCs for now 916: orientation: "vertical" 917: size_hint_y: None 918: height: self.minimum_height ... ValueError: GridLayout.orientation is set to an invalid option 'vertical'. Must be one of: ['lr-tb', 'tb-lr', 'rl-tb', 'tb-rl', 'lr-bt', 'bt-lr', 'rl-bt', 'bt-rl'] File "/usr/local/lib/python3.7/dist-packages/kivy/lang/builder.py", line 706, in _apply_rule setattr(widget_set, key, value) File "kivy/weakproxy.pyx", line 35, in kivy.weakproxy.WeakProxy.setattr File "kivy/properties.pyx", line 520, in kivy.properties.Property.set File "kivy/properties.pyx", line 564, in kivy.properties.Property.set File "kivy/properties.pyx", line 555, in kivy.properties.Property.set File "kivy/properties.pyx", line 1354, in kivy.properties.OptionProperty.check
If i change the window orientation issue to one of the allowed enums in main.kv, i then get a different error:
[INFO ] [HIDMotionEvent] using <Chicony 2.4G Multimedia Wireless Kit> Traceback (most recent call last): File "main.py", line 1008, in
MainApp().run() File "/usr/local/lib/python3.7/dist-packages/kivy/app.py", line 955, in run runTouchApp() File "/usr/local/lib/python3.7/dist-packages/kivy/base.py", line 596, in runTouchApp EventLoop.mainloop() File "/usr/local/lib/python3.7/dist-packages/kivy/base.py", line 361, in mainloop self.idle() File "/usr/local/lib/python3.7/dist-packages/kivy/base.py", line 401, in idle Clock.tick() File "/usr/local/lib/python3.7/dist-packages/kivy/clock.py", line 733, in tick self.post_idle(ts, self.idle()) File "/usr/local/lib/python3.7/dist-packages/kivy/clock.py", line 776, in post_idle self._process_events() File "kivy/_clock.pyx", line 616, in kivy._clock.CyClockBase._process_events File "kivy/_clock.pyx", line 649, in kivy._clock.CyClockBase._process_events File "kivy/_clock.pyx", line 645, in kivy._clock.CyClockBase._process_events File "kivy/_clock.pyx", line 218, in kivy._clock.ClockEvent.tick TypeError: create_window() takes 1 positional argument but 2 were given Any suggestions you have would be very much greatfully received..., my plan was to change the input source from generic OBDII to a custom wirten UK Rover cars MEMS2J serial stream to connect to a UK Rover Mini, probably ambitious but hey, you don't know if you don't try....
best regards, Dave Horsler.
On Tue, 18 May 2021 at 14:03, Joel Zeller @.***> wrote:
Hello,
Can you send any errors that you received? I have not tried to install on anything newer than what I had in the documentation.
Thanks,
Joel Zeller
On Tue, May 18, 2021, 4:36 AM dhorsler @.***> wrote:
it seems to be particularly hard to get this running with the latest pi updates and kivy version, initially an issue with window orientation as 'vertical' is no longer supported by kivy version 1.10 and above and then an issue with window creation requiring 1 argment not 2 that i've failed to track down as of yet....
any suggestions of how to get this to run on newer kivy version gratefully received.
for the record, have tried kivy1.9 (before the orientation format changes) but that fails dismally to install on pi with latest python updates....
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Joelzeller/DigitalRaceDashSlim/issues/1, or unsubscribe <
https://github.com/notifications/unsubscribe-auth/ABNXGSCDFOVXNSWA4J72DILTOIRHTANCNFSM45CBP7DQ
.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub <
https://github.com/Joelzeller/DigitalRaceDashSlim/issues/1#issuecomment-843152072
, or unsubscribe <
https://github.com/notifications/unsubscribe-auth/ANL4FZWZ2IO7J3MPCM7DMNLTOJQRLANCNFSM45CBP7DQ
.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub <
https://github.com/Joelzeller/DigitalRaceDashSlim/issues/1#issuecomment-843175428
, or unsubscribe <
https://github.com/notifications/unsubscribe-auth/ABNXGSDRSMLODWJU4RTLFO3TOJUCBANCNFSM45CBP7DQ
.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub < https://github.com/Joelzeller/DigitalRaceDashSlim/issues/1#issuecomment-843187322 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/ANL4FZU7CGZYTMQ6BDVITTDTOJV33ANCNFSM45CBP7DQ
.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Joelzeller/DigitalRaceDashSlim/issues/1#issuecomment-843617522, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABNXGSBNFZHHTPMW6R7SS6DTOLVIHANCNFSM45CBP7DQ .
good spot, the GPU memory split option has moved in raspi-config, it now lives in 4. Performance->GPU Memory->
Set this to 512 and now some graphics appear which is a big step forward, albeit the gauges and black boxes are not aligned correctly, possibly related to the orientation change, i'll take a look ......
Hi Dave, commenting out that line still has the error for me. Did you manage to figure out a solution for this or would you mind pasting your main.py file here so I could have a look.
Thank you, Jamie
Hi Jamie,
Yes, that worked or me, I have it running on a couple of pi's now, i had to make 2 changes, one for the orientation issue and one for the screen size.
What is the error that you see?
I've added my modified main.py but it probably won't be much use to you since i've heavily modified it to use a different OBD interface that i wrote for Rover UK cars.
best regards, Dave
On Mon, 5 Jul 2021 at 08:03, jamiegrady @.***> wrote:
Hi Dave, commenting out that line still has the error for me. Did you manage to figure out a solution for this or would you mind pasting your main.py file here so I could have a look.
Thank you, Jamie
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Joelzeller/DigitalRaceDashSlim/issues/1#issuecomment-873858203, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANL4FZUMOFOMFI7YYWTWOSDTWFKNLANCNFSM45CBP7DQ .
import kivy
from kivy.app import App from kivy.uix.screenmanager import Screen from kivymd.theming import ThemeManager from kivy.clock import Clock from kivy.properties import NumericProperty, StringProperty, ObjectProperty, ListProperty from kivymd.dialog import MDDialog from kivymd.label import MDLabel from kivy.metrics import dp import threading import subprocess import socket import time import os import math
globalversion = "V1.2.2"
developermode = 0 # set to 1 to disable all GPIO, temp probe, and obd stuff externalshutdown = 0 # set to 1 if you have an external shutdown circuit applied - High = Awake, Low = Shutdown AccelEnabled = 0 # set to 1 if adxl345 accelerometer is present OBDEnabled = 1 # set to 1 if you have an OBD connection with the vehicle onPi = 1 # 1 by default, will change to 0 if code cannot import GPIO from Pi autobrightness = 0 # AutoBrightness on Boot #set to 1 if you have the newer RPi display and want autobrightness
# adjust to suit your needs :)
# Set to 2 for auto dim on boot every time (use main screen full screen button to toggle full dim and full bright)
from kivy.config import Config Config.set('graphics', 'width', '800') Config.set('graphics', 'height', '600') from kivy.core.window import Window
try: import RPi.GPIO as GPIO onPi = 1 # If GPIO is successfully imported, we can assume we are running on a Raspberry Pi GPIO.setmode(GPIO.BCM) GPIO.setwarnings(False) if externalshutdown == 1: GPIO.setup(21, GPIO.IN) # setup GPIO pin #21 as external shutdown pin except: onPi = 0 externalshutdown = 0 print("This is not being run on a Raspberry Pi. Functionality is limited.")
if onPi and OBDEnabled and developermode == 0: try: import mems except ImportError as error:
print(error.__class__.__name__ + ": " + error.message)
OBDEnabled = 0
except Exception as exception:
# Output unexpected Exceptions.
print(exception, False)
print(exception.__class__.__name__ + ": " + exception.message)
OBDEnabled = 0
except:
OBDEnabled = 0
print("mems import error")
else: OBDEnabled = 0
def CheckExternalShutdown(): while True: if GPIO.input(21) == 0: # if port 21 == 0, M0 will drive LOW when time to shutdown print("GPIO 21 is low - Start Shutdown Sequence") time.sleep(5) # wait 5 seconds to check again if GPIO.input(21) == 0: print("Passed 5 second check") sys.shutdownflag = 1 # set shutdown flag so kv file can show shutdown screen time.sleep(2) # wait 2 more seconds to double check it if GPIO.input(21) == 0: print("Pi is shutting down now, it is irreversible")
time.sleep(5) # show the shutdown screen for 5 seconds longer
print("SHUTDOWN SENT")
os.system('sudo bash -c "echo 1 > /sys/class/backlight/rpi_backlight/bl_power"') # turns screen off
time.sleep(1)
os.system("sudo shutdown -h now")
else:
print("Shutdown signal <5 seconds, keep ON")
sys.shutdownflag = 0 # set shutdown flag so kv file can go back to normal
time.sleep(.5)
if externalshutdown: ExternalShutdownCheckThread = threading.Thread(name='check_externalshutdown_thread', target=CheckExternalShutdown) ExternalShutdownCheckThread.start()
class sys: version = globalversion ip = "No IP address found..." ssid = "No SSID found..." CPUTemp = 0 CPUVolts = 0 getsysteminfo = False screen = 1 brightness = 0 shutdownflag = 0 TempUnit = "C" SpeedUnit = "MPH"
def setbrightness(self, value):
sys.brightness = value
brightset = 'sudo bash -c "echo ' + str(sys.brightness) + ' > /sys/class/backlight/rpi_backlight/brightness"'
os.system(brightset)
def loaddata(self):
f = open('savedata.txt', 'r+') # read from text file
OBD.warning.RPM = int(f.readline())
OBD.warning.Speed = int(f.readline())
OBD.warning.CoolantTemp = int(f.readline())
OBD.warning.IntakeTemp = int(f.readline())
OBD.warning.O2mv = int(f.readline())
OBD.warning.Feedback = int(f.readline())
sys.TempUnit = f.readline().rstrip()
sys.SpeedUnit = f.readline().rstrip()
f.close()
def savedata(self):
f = open('savedata.txt', 'r+')
f.truncate() # wipe everything
f.write(
str(OBD.warning.RPM) + "\n" +
str(OBD.warning.Speed) + "\n" +
str(OBD.warning.CoolantTemp) + "\n" +
str(OBD.warning.IntakeTemp) + "\n" +
str(OBD.warning.O2mv) + "\n" +
str(OBD.warning.Feedback) + "\n" +
sys.TempUnit + "\n" +
sys.SpeedUnit
)
f.close()
class vehicle: class gear:
qty = 4
reverse = 2.800
primary = 1.160
first = 3.133
second = 2.045
third = 1.481
fourth = 1.161
final = 4.10
reduction = final * primary
tirediam = 24.7 # in inches
tirerad = tirediam/2
current = "N"
def findgear (self, RPM, Speed):
if Speed == 0 or RPM < 1500:
vehicle.gear.current = "N"
return
else:
ratiocalcd = .00595 * RPM * vehicle.gear.tirerad / (vehicle.gear.reduction * Speed)
firstdelta = abs(vehicle.gear.first - ratiocalcd)
seconddelta = abs(vehicle.gear.second - ratiocalcd)
thirddelta = abs(vehicle.gear.third - ratiocalcd)
fourthdelta = abs(vehicle.gear.fourth - ratiocalcd)
reversedelta = abs(vehicle.gear.reverse - ratiocalcd)
GearArray = [firstdelta, seconddelta, thirddelta, fourthdelta] # remove reverse for now
smallestDelta = min(GearArray)
smallestGear = GearArray.index(smallestDelta)
if smallestGear == 6:
vehicle.gear.current = "R"
else:
vehicle.gear.current = str(smallestGear + 1)
class OBD: Connected = 0 # connection is off by default - will be turned on in setup thread RPM_max = 0 # init all values to 0 Speed_max = 0 RPM = 0 Speed = 0 CoolantTemp = 0 IntakeTemp = 0 OilTemp = 0 Voltage = 12.0 ThrottlePos = 0 IntakePressure = 100 Feedback = 100 O2mv = 500 IdlePos = 0 IdleError = 0 ClosedLoop = 0
class dev: # used for development of GUI and testing
Speed = 0
Speed_inc = 1
RPM = 0
RPM_inc = 1
CoolantTemp = 0
CoolantTemp_inc = 1
FuelTrim = 0
FuelTrim_inc = 1
Generic = 0
Generic_inc = 1
class enable: # used to turn on and off OBD cmds to speed up communication
RPM = 1
Speed = 0
CoolantTemp = 1 # On Start-Up Screen
IntakeTemp = 1 # On Start-Up Screen
OilTemp = 1
ThrottlePos = 1
IntakePressure = 1
Feedback = 1
O2mv = 1
IdlePos = 1
IdleError = 1
ClosedLoop = 1
Voltage = 1 # On Start-Up Screen
Gear = 0
def disableAll(obj):
OBD.enable.RPM = 0
OBD.enable.Speed = 0
OBD.enable.CoolantTemp = 0
OBD.enable.IntakeTemp = 0
OBD.enable.OilTemp = 0
OBD.enable.ThrottlePos = 0
OBD.enable.IntakePressure = 0
OBD.enable.Feedback = 0
OBD.enable.O2mv = 0
OBD.enable.IdlePos = 0
OBD.enable.IdleError = 0
OBD.enable.ClosedLoop = 0
OBD.enable.Voltage = 0
OBD.enable.Gear = 0
class warning: # used to show warning when value is met, these will be read from savefile
RPM = 0
Speed = 0
CoolantTemp = 105
IntakeTemp = 45
O2mv = 10
class gauge: # Vars for S2K gauge GUI
class image: # images to be used for S2K style gauges
CoolantTemp = "data/gauges/normal/S2K_0.png"
IntakeTemp = "data/gauges/normal/S2K_0.png"
Voltage = "data/gauges/normal/S2K_0.png"
O2mv = "data/gauges/split/S2K_0.png"
Feedback = "data/gauges/split/S2K_0.png"
ThrottlePos = "data/gauges/normal/S2K_0.png"
IdlePos = "data/gauges/normal/S2K_0.png"
IdleError = "data/gauges/normal/S2K_0.png"
ClosedLoop = "data/gauges/normal/S2K_0.png"
IntakePressure = "data/gauges/normal/S2K_0.png"
class persegment:
# Max values for each S2K Bar Gauge
CoolantTemp_max = 60
IntakeTemp_max = 80
Voltage_max = 20
O2mv_max = 2000 # value + 25 (make gauge 0->50)
Feedback_max = 200 # value + 25 (make gauge 0->50)
ThrottlePos_max = 100
IdlePos_max = 250
IdleError_max = 500
RPM_max = 6500
Speed_max = 100
IntakePressure_max = 105
ClosedLoop_max = 1
# Find value per segment rounded to 2 decimal places
CoolantTemp = round(CoolantTemp_max / 32.0, 2)
IntakeTemp = round(IntakeTemp_max / 32.0, 2)
Voltage = round(Voltage_max / 32.0, 2)
O2mv = round(O2mv_max / 32.0, 2)
Feedback = round(Feedback_max / 32.0, 2)
ThrottlePos = round(ThrottlePos_max / 32.0, 2)
IdleError = round(IdleError_max / 32.0, 2)
IdlePos = round(IdlePos_max / 32.0, 2)
IntakePressure = round(IntakePressure_max / 32.0, 2)
ClosedLoop = round(ClosedLoop_max / 32.0, 2)
# Thread functions - to be called later
# These will run in the background and will not block the GUI
def OBD_setup_thread(self):
global OBDEnabled
global OBDSetupThread
global ser
while(1):
while OBD.Connected == 1: # wait here while OBD system initializes
pass
while OBD.Connected == 0: # wait here while OBD system initializes
# try to open USB adapter
print("OBD_setup_thread")
try:
if OBDEnabled == 1:
print("Try to Open USB adapter")
ser = mems.open_serial()
except Exception as exception:
# Output unexpected Exceptions.
print(exception, False)
print(exception.__class__.__name__ + ": " + exception.message)
OBDEnabled = 0
print("Failed to open USB adapter")
# try to connect to ECU if USB opened ok
try:
if OBDEnabled == 1:
OBD.Connected = mems.ecu_connect(ser)
if OBD.Connected == 1:
print("Mems System is Ready, Starting Update Thread")
else:
print("Mems connect Failed")
except Exception as exception:
# Output unexpected Exceptions.
print(exception, False)
print(exception.__class__.__name__ + ": " + exception.message)
print("Error connecting to ECU. OBD is now disabled.")
try:
MainApp.show_warning(self,"Error Mems Connect Failed", "Mems retrying")
except:
print("Dialog could not open, no window?")
OBDEnabled = 0
def OBD_update_thread(self):
global ser
cmd_timeout = 0
while(1):
while OBD.Connected == 0: # wait here while OBD system initializes
pass
while OBDEnabled and OBD.Connected:
if OBD.enable.Speed:
try:
response_SPEED = 0 # send the command, and parse the response
OBD.Speed = int(response_SPEED)
if OBD.Speed > OBD.Speed_max: # set MAX variable if higher
OBD.Speed_max = OBD.Speed
except:
print("Could not get OBD Response - Speed")
if OBD.enable.RPM:
try:
response_RPM = mems.get_rpm(ser)
if response_RPM != -999:
cmd_timeout = 0
OBD.RPM = int(response_RPM)
if OBD.RPM > OBD.RPM_max:
OBD.RPM_max = OBD.RPM
else:
cmd_timeout += 1
except:
print("Could not get OBD Response - RPM")
if OBD.enable.CoolantTemp:
try:
response_CoolantTemp = mems.get_coolant_temp(ser)
if response_CoolantTemp != -999:
cmd_timeout = 0
OBD.CoolantTemp = int(response_CoolantTemp)
else:
cmd_timeout +=1
except:
print(exception, False)
print(exception.__class__.__name__ + ": " + exception.message)
print("Could not get OBD Response - Coolant Temp")
if OBD.enable.IntakeTemp:
try:
response_IntakeTemp = mems.get_air_temp(ser)
if response_IntakeTemp != -999:
cmd_timeout = 0
OBD.IntakeTemp = int(response_IntakeTemp)
else:
cmd_timeout +=1
except:
print("Could not get OBD Response - Intake Temp")
if OBD.enable.IntakePressure:
try:
response_IntakePressure = mems.get_map(ser)
if response_IntakePressure != -999:
cmd_timeout = 0
OBD.IntakePressure = int(response_IntakePressure) # kPa
else:
cmd_timeout +=1
except:
print("Could not get OBD Response - Intake Pressure")
if OBD.enable.ThrottlePos:
try:
response_ThrottlePos = mems.get_tps(ser)
if response_ThrottlePos != -999:
cmd_timeout = 0
OBD.ThrottlePos = int(response_ThrottlePos)
else:
cmd_timeout +=1
except:
print("Could not get OBD Response - Throttle Position")
if OBD.enable.O2mv:
try:
response_O2_mv = mems.get_o2(ser)
if response_O2_mv[0] != -999:
cmd_timeout = 0
OBD.O2mv = int(response_O2_mv[0])
OBD.Feedback = int(response_O2_mv[1])
else:
cmd_timeout +=1
except:
print("Could not get OBD Response - O2_mv")
if OBD.enable.IdlePos:
try:
response_Idle = mems.get_idle(ser)
if response_Idle != -999:
cmd_timeout = 0
OBD.IdlePos = int(response_Idle)
else:
cmd_timeout +=1
except:
print("Could not get OBD Response - Idle Pos")
if OBD.enable.IdleError:
try:
response_Idle_error = mems.get_idle_error(ser)
if response_Idle_error != -999:
cmd_timeout = 0
OBD.IdleError = int(response_Idle_error)
else:
cmd_timeout +=1
except:
print("Could not get OBD Response - idle error")
if OBD.enable.Voltage:
try:
response_Voltage = mems.get_battery_voltage(ser)
if response_Voltage != -999:
cmd_timeout = 0
OBD.Voltage = int(response_Voltage)
else:
cmd_timeout +=1
except:
print("Could not get OBD Response - Voltage")
# if more than 20 no responses, go back to disconnected state
if cmd_timeout > 20:
OBD.Connected = 0
cmd_timeout = 0
def start_setup_thread(self):
OBDSetupThread = threading.Thread(name='obd_setup_thread', target=self.OBD_setup_thread)
OBDSetupThread.start()
def start_update_thread(self):
OBDUpdateThread = threading.Thread(name='obd_update_thread', target=self.OBD_update_thread)
OBDUpdateThread.start()
if OBDEnabled: OBD().start_setup_thread() OBD().start_update_thread()
sys().loaddata()
if developermode == 0: if autobrightness == 1: currenthour = int(time.strftime("%-H")) # hour as decimal (24hour) if currenthour < 7 or currenthour >= 20: # earlier than 7am and later than 6pm -> dim screen on start sys().setbrightness(15) else: sys().setbrightness(255)
if autobrightness == 2: # start on dim every time
sys().setbrightness(15)
class Gauge1Screen(Screen): pass class Gauge2Screen(Screen): pass class Gauge3Screen(Screen): pass class Gauge4Screen(Screen): pass class MaxScreen(Screen): pass class InfoScreen(Screen): def on_enter(self): sys.getsysteminfo = True def on_pre_leave(self): sys.getsysteminfo = False class SettingsScreen(Screen): pass class TempSettingsScreen(Screen): pass class FuelSettingsScreen(Screen): pass class SpeedSettingsScreen(Screen): pass class DTCScreen(Screen): pass
class MainApp(App): def build(self): Clock.schedule_interval(self.updatevariables, .1) Clock.schedule_interval(self.updateOBDdata, .01)
theme_cls = ThemeManager()
version = StringProperty()
TempUnit = StringProperty()
SpeedUnit = StringProperty()
ipAddress = StringProperty()
WifiNetwork = StringProperty()
CPUTemp = NumericProperty(0)
CPUVolts = NumericProperty(0)
shutdownflag = NumericProperty()
theme_cls.theme_style = "Dark"
theme_cls.primary_palette = "Red"
Redline = NumericProperty(0)
SpeedLimit = NumericProperty(0)
currentgear = StringProperty()
Speed = NumericProperty(0)
Speed_max = NumericProperty(0)
RPM = NumericProperty(0)
RPM_max = NumericProperty(0)
CoolantTemp = NumericProperty(0)
IntakeTemp = NumericProperty(0)
IntakePressure = NumericProperty(0)
ThrottlePos = NumericProperty(0)
O2mv = NumericProperty(0)
Feedback = NumericProperty(0)
RunTime = NumericProperty(0)
Voltage = NumericProperty(0)
IdlePos = NumericProperty(0)
IdleError = NumericProperty(0)
ClosedLoop = NumericProperty(0)
RPMWarn = NumericProperty(0)
SpeedWarn = NumericProperty(0)
CoolantTempWarn = NumericProperty(0)
IntakeTempWarn = NumericProperty(0)
O2mvWarn = NumericProperty(0)
FeedbackWarn = NumericProperty(0)
CoolantTemp_Image = StringProperty()
IntakeTemp_Image = StringProperty()
Voltage_Image = StringProperty()
O2mv_Image = StringProperty()
Feedback_Image = StringProperty()
ThrottlePos_Image = StringProperty()
IdlePos_Image = StringProperty()
IdleError_Image = StringProperty()
ClosedLoop_Image = StringProperty()
IntakePressure_Image = StringProperty()
RPMGaugeMax = OBD.gauge.persegment.RPM_max
SpeedGaugeMax = OBD.gauge.persegment.Speed_max
CoolantTempGaugeMax = OBD.gauge.persegment.CoolantTemp_max
IntakeTempGaugeMax = OBD.gauge.persegment.IntakeTemp_max
VoltageGaugeMax = OBD.gauge.persegment.Voltage_max
O2mvGaugeMax = OBD.gauge.persegment.O2mv_max
FeedbackGaugeMax = OBD.gauge.persegment.Feedback_max
IdlePosGaueMax = OBD.gauge.persegment.IdlePos_max
IdleErrorGaugeMax = OBD.gauge.persegment.IdleError_max
ClosedLoopGaugeMax = OBD.gauge.persegment.ClosedLoop_max
IntakePressureMax = OBD.gauge.persegment.IntakePressure_max
def updatevariables(self, *args):
self.version = sys.version
self.TempUnit = sys.TempUnit
self.SpeedUnit = sys.SpeedUnit
self.shutdownflag = sys.shutdownflag
self.currentgear = vehicle.gear.current
self.RPMWarn = OBD.warning.RPM
self.SpeedWarn = OBD.warning.Speed
self.CoolantTempWarn = OBD.warning.CoolantTemp
self.IntakeTempWarn = OBD.warning.IntakeTemp
self.O2mvWarn = OBD.warning.O2mv
self.FeedbackWarn = OBD.warning.Feedback
if sys.getsysteminfo == True:
self.get_CPU_info()
self.get_IP()
if OBD.enable.Gear:
try:
if OBD.Connected == 0 and developermode:
vehicle().findgear(OBD.dev.RPM, OBD.dev.Speed)
else:
vehicle().findgear(OBD.RPM, OBD.Speed)
except:
print("Gear Calculation Failed")
def updateOBDdata(self, *args):
if OBD.Connected and developermode == 0:
try:
self.Speed = OBD.Speed
self.Speed_max = OBD.Speed_max
self.RPM = OBD.RPM
self.RPM_max = OBD.RPM_max
self.CoolantTemp = OBD.CoolantTemp
self.IntakeTemp = OBD.IntakeTemp
self.IntakePressure = OBD.IntakePressure
self.ThrottlePos = OBD.ThrottlePos
self.O2mv = OBD.O2mv
self.Feedback = OBD.Feedback
self.Voltage = OBD.Voltage/10.0
self.ClosedLoop = OBD.ClosedLoop
self.IdleError = OBD.IdleError
self.IdlePos = OBD.IdlePos
except Exception as exception:
# Output unexpected Exceptions.
print(exception, False)
print(exception.__class__.__name__ + ": " + exception.message)
#except:
print("Python -> Kivy OBD Var Setting Failure")
if OBD.Connected == 0 and developermode:
#Speedo Dev Code
if OBD.dev.Speed_inc == 1:
OBD.dev.Speed = OBD.dev.Speed + 1
else:
OBD.dev.Speed = OBD.dev.Speed - 1
if OBD.dev.Speed > 150:
OBD.dev.Speed_inc = 0
if OBD.dev.Speed < 1:
OBD.dev.Speed_inc = 1
if OBD.dev.Speed > OBD.Speed_max:
OBD.Speed_max = OBD.dev.Speed
self.Speed = OBD.dev.Speed
self.Speed_max = OBD.Speed_max
#Tach Dev Code
if OBD.dev.RPM_inc == 1:
OBD.dev.RPM = OBD.dev.RPM + 10
else:
OBD.dev.RPM = OBD.dev.RPM - 10
if OBD.dev.RPM > 9100:
OBD.dev.RPM_inc = 0
if OBD.dev.RPM < 100:
OBD.dev.RPM_inc = 1
if OBD.dev.RPM > OBD.RPM_max:
OBD.RPM_max = OBD.dev.RPM
self.RPM = OBD.dev.RPM
self.RPM_max = OBD.RPM_max
#Coolant Dev Code
if OBD.dev.CoolantTemp_inc == 1:
OBD.dev.CoolantTemp = OBD.dev.CoolantTemp + 1
else:
OBD.dev.CoolantTemp = OBD.dev.CoolantTemp - 1
if OBD.dev.CoolantTemp > 250:
OBD.dev.CoolantTemp_inc = 0
if OBD.dev.CoolantTemp < 1:
OBD.dev.CoolantTemp_inc = 1
self.CoolantTemp = OBD.dev.CoolantTemp
# FuelTrim Dev Code
#Generic Dev Code
if OBD.dev.Generic_inc == 1:
OBD.dev.Generic = OBD.dev.Generic + 1
else:
OBD.dev.Generic = OBD.dev.Generic - 1
if OBD.dev.Generic > 99:
OBD.dev.Generic_inc = 0
if OBD.dev.Generic < 10:
OBD.dev.Generic_inc = 1
self.IntakeTemp = OBD.dev.Generic
self.ThrottlePos = OBD.dev.Generic
self.RunTime = OBD.dev.Generic
self.WarmUpsSinceDTC = OBD.dev.Generic
self.DistanceSinceDTC = OBD.dev.Generic
self.Voltage = OBD.dev.Generic / 10.0
# S2K Bar Image Selection
if OBD.enable.CoolantTemp and self.CoolantTemp > 60 and 0 <= int(round((self.CoolantTemp-60)/OBD.gauge.persegment.CoolantTemp)) <= 32:
self.CoolantTemp_Image = str('data/gauges/normal/s2k_'+(str(int(round((self.CoolantTemp-60)/OBD.gauge.persegment.CoolantTemp))))+'.png')
else:
self.CoolantTemp_Image = str('data/gauges/normal/s2k_0.png')
if OBD.enable.IntakeTemp and 0 <= int(round(self.IntakeTemp/OBD.gauge.persegment.IntakeTemp)) <= 32:
self.IntakeTemp_Image = str('data/gauges/normal/s2k_'+(str(int(round(self.IntakeTemp/OBD.gauge.persegment.IntakeTemp))))+'.png')
if OBD.enable.Voltage and 0 <= int(round(self.Voltage/OBD.gauge.persegment.Voltage)) <= 32:
self.Voltage_Image = str('data/gauges/normal/s2k_'+(str(int(round(self.Voltage/OBD.gauge.persegment.Voltage))))+'.png')
if OBD.enable.O2mv and 0 <= int(round(self.O2mv/OBD.gauge.persegment.O2mv)) <= 32:
self.O2mv_Image = str('data/gauges/normal/s2k_' + (str(int(round(self.O2mv/OBD.gauge.persegment.O2mv))))+'.png')
if OBD.enable.Feedback and 0 <= int(round(self.Feedback/OBD.gauge.persegment.Feedback)) <= 32:
self.Feedback_Image = str('data/gauges/normal/s2k_' + (str(int(round(self.Feedback/OBD.gauge.persegment.Feedback))))+'.png')
if OBD.enable.ThrottlePos and 0 <= int(round(self.ThrottlePos/OBD.gauge.persegment.ThrottlePos)) <= 32:
self.ThrottlePos_Image = str('data/gauges/normal/s2k_'+(str(int(round(self.ThrottlePos/OBD.gauge.persegment.ThrottlePos))))+'.png')
if OBD.enable.IdlePos and 0 <= int(round(self.IdlePos/OBD.gauge.persegment.IdlePos)) <= 32:
self.IdlePos_Image = str('data/gauges/normal/s2k_'+(str(int(round(self.IdlePos/OBD.gauge.persegment.IdlePos))))+'.png')
if OBD.enable.IdleError and 0 <= int(round(self.IdleError/OBD.gauge.persegment.IdleError)) <= 32:
self.IdleError_Image = str('data/gauges/normal/s2k_'+(str(int(round(self.IdleError/OBD.gauge.persegment.IdleError))))+'.png')
if OBD.enable.ThrottlePos and 0 <= int(round(self.ThrottlePos/OBD.gauge.persegment.ClosedLoop)) <= 32:
self.Closed_Image = str('data/gauges/normal/s2k_'+(str(int(round(self.ClosedLoop/OBD.gauge.persegment.ClosedLoop))))+'.png')
if OBD.enable.IntakePressure and 0 <= int(round(self.IntakePressure/OBD.gauge.persegment.IntakePressure)) <= 32:
self.IntakePressure_Image = str('data/gauges/normal/s2k_'+(str(int(round(self.IntakePressure/OBD.gauge.persegment.IntakePressure))))+'.png')
def save(obj):
sys().savedata() # save new variables for next boot
def shutdown(obj):
os.system("sudo shutdown -h now")
def reboot(obj):
os.system("sudo reboot")
def killapp(obj):
os.system("sudo killall python3") # Kills all running processes and threads
def ScreenOnOff(obj,action):
if action == "ON":
sys.screen = 1
os.system('sudo bash -c "echo 0 > /sys/class/backlight/rpi_backlight/bl_power"') # turns screen on
elif action == "OFF":
sys.screen = 0
os.system('sudo bash -c "echo 1 > /sys/class/backlight/rpi_backlight/bl_power"') # turns screen off
def BrightnessSet(obj,brightvalue): # brightness control function
brightnesscommand = 'sudo bash -c "echo '+str(brightvalue)+' > /sys/class/backlight/rpi_backlight/brightness"'
os.system(brightnesscommand)
sys.brightness = brightvalue
def get_IP(self):
if developermode == 0:
try:
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
s.connect(("8.8.8.8", 80))
sys.ip = s.getsockname()[0]
except:
sys.ip = "No IP address found..."
print("Could not get IP")
try:
ssidstr = str(subprocess.check_output("iwgetid -r", shell=True))
sys.ssid = ssidstr[2:-3]
except:
sys.ssid = "No SSID found..."
print("Could not get SSID")
self.ipAddress = sys.ip
self.WifiNetwork = sys.ssid
def get_CPU_info(self):
if developermode == 0:
try:
tFile = open('/sys/class/thermal/thermal_zone0/temp')
temp = float(tFile.read())
tempC = temp / 1000
tempF = tempC * 9.0 / 5.0 + 32.0
sys.CPUTemp = round(tempC,2)
except:
print("Could not get CPU Temp")
sys.CPUTemp = 0
try:
voltstr = str(subprocess.check_output(["/opt/vc/bin/vcgencmd", "measure_volts core"]))
sys.CPUVolts = float(voltstr.split('=')[1][:-4])
except:
print("Could not get CPU core Voltage")
sys.CPUVolts = 0
self.CPUVolts = sys.CPUVolts
self.CPUTemp = sys.CPUTemp
def toggleTempUnit(self):
if sys.TempUnit == "C":
sys.TempUnit = "F"
else:
sys.TempUnit = "C"
def toggleSpeedUnit(self):
if sys.SpeedUnit == "KPH":
sys.SpeedUnit = "MPH"
else:
sys.SpeedUnit = "KPH"
def zero_out_max(obj): # zeros out RPM max
OBD.RPM_max = 0
OBD.Speed_max = 0
def OBDEnabler(obj, PID, status):
setattr(OBD.enable, PID, status) # sets OBD enable class based on PID (text) and Status (int) input
def OBDOFF(obj):
OBD.enable.RPM = 0
OBD.enable.Speed = 0
OBD.enable.CoolantTemp = 0
OBD.enable.IntakeTemp = 0
OBD.enable.IntakePressure = 0
OBD.enable.ThrottlePos = 0
OBD.enable.O2mv = 0
OBD.enable.Feedback = 0
OBD.enable.RunTime = 0
OBD.enable.WarmUpsSinceDTC = 0
OBD.enable.DistanceSinceDTC = 0
OBD.enable.Voltage = 0
def CoolantTempWarnSlider(self, instance, value):
OBD.warning.CoolantTemp = int(math.floor(value))
def IntakeTempWarnSlider(self, instance, value):
OBD.warning.IntakeTemp = int(math.floor(value))
def O2mvWarnSlider(self, instance, value):
OBD.warning.STFT = int(math.floor(value))
def FeedbackWarnSlider(self, instance, value):
OBD.warning.LTFT = int(math.floor(value))
def RPMWarnSlider(self, instance, value):
OBD.warning.RPM = int(math.floor(value))
def SpeedWarnSlider(self, instance, value):
OBD.warning.Speed = int(math.floor(value))
def ReadDTC(self):
if OBDEnabled and OBD.Connected:
try:
response_DTC = OBD.connection.query(OBD.cmd_ReadDTC)
except:
print("Could not read DTCs")
self.show_warning("Could not read DTCs", "")
elif developermode: # For development
class response_DTC:
value = 0
response_DTC.value = [
("P0104", "Mass or Volume Air Flow Circuit Intermittent"), # generic error code
("P1457", ""), # not general DTC, but its in S2k Dictionary
("P1416", ""), # not general DTC, but its in S2k Dictionary
("C0123", "") # unknown error code, not in S2k Dictionary
]
try:
OBD.DTC.quantity = len(response_DTC.value)
self.DTCqty = OBD.DTC.quantity
for i in range(0, OBD.DTC.quantity):
if response_DTC.value[i][1] == "":
if OBD.DTC.S2KDTC.get(str(response_DTC.value[i][0])) != None:
string = str(response_DTC.value[i][0]) + " - "\
+ OBD.DTC.S2KDTC.get(str(response_DTC.value[i][0]))
else:
string = str(response_DTC.value[i][0])
else:
string = str(response_DTC.value[i][0]) + " - " + str(response_DTC.value[i][1])
setattr(OBD.DTC, "DTC" + str(i), string)
except:
print("Could not complete DTC determination loop.")
self.show_warning("DTCs were read, but could not sort them","")
self.DTC0 = OBD.DTC.DTC0
self.DTC1 = OBD.DTC.DTC1
self.DTC2 = OBD.DTC.DTC2
self.DTC3 = OBD.DTC.DTC3
self.DTC4 = OBD.DTC.DTC4
self.DTC5 = OBD.DTC.DTC5
self.DTC6 = OBD.DTC.DTC6
self.DTC7 = OBD.DTC.DTC7
self.DTC8 = OBD.DTC.DTC8
self.DTC9 = OBD.DTC.DTC9
def ClearDTC(self):
if OBDEnabled and OBD.Connected:
try:
OBD.connection.query(OBD.cmd_ClearDTC)
except:
print("Could not clear DTCs")
self.show_warning("Could not clear DTCs", "")
self.DTCqty = 0
self.DTC0 = ""
self.DTC1 = ""
self.DTC2 = ""
self.DTC3 = ""
self.DTC4 = ""
self.DTC5 = ""
self.DTC6 = ""
self.DTC7 = ""
self.DTC8 = ""
self.DTC9 = ""
def initOBD(self):
global OBDEnabled
OBDEnabled = 1
OBD().OBD_setup_thread() # retry OBD setup thread
def show_warning(self,title,body):
content = MDLabel(font_style='Body1',
theme_text_color='Secondary',
text=body,
size_hint_y=None,
valign='top')
content.bind(texture_size=content.setter('size'))
self.dialog = MDDialog(title=title,
content=content,
size_hint=(.8, .2),
height=dp(100),
auto_dismiss=False)
self.dialog.add_action_button("Dismiss", action=lambda *x: self.dialog.dismiss())
self.dialog.open()
if name =='main': MainApp().run()
This is my error message with the Window.size = (800, 400) commented out.
pi@raspberrypi:~ $ sh launcher.sh
[INFO ] [Logger ] Record log in /root/.kivy/logs/kivy_21-07-05_6.txt
[INFO ] [Kivy ] v2.1.0.dev0
[INFO ] [Kivy ] Installed at "/usr/local/lib/python3.7/dist-packages/kivy/init.py"
[INFO ] [Python ] v3.7.3 (default, Jan 22 2021, 20:04:44)
[GCC 8.3.0]
[INFO ] [Python ] Interpreter at "/usr/bin/python3"
[INFO ] [Logger ] Purge log fired. Processing...
[INFO ] [Logger ] Purge finished!
[INFO ] [Factory ] 189 symbols loaded
[INFO ] [Image ] Providers: img_tex, img_dds, img_sdl2, img_pil (img_ffpyplayer ignored)
[INFO ] [Text ] Provider: sdl2
[INFO ] [Window ] Provider: egl_rpi
[INFO ] [GL ] Using the "OpenGL ES 2" graphics system
[INFO ] [GL ] Backend used
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "main.py", line 1008, in
916: orientation: "vertical" 917: size_hint_y: None 918: height: self.minimum_height ... ValueError: GridLayout.orientation is set to an invalid option 'vertical'. Must be one of: ['lr-tb', 'tb-lr', 'rl-tb', 'tb-rl', 'lr-bt', 'bt-lr', 'rl-bt', 'bt-rl'] File "/usr/local/lib/python3.7/dist-packages/kivy/lang/builder.py", line 706, in _apply_rule setattr(widget_set, key, value) File "kivy/weakproxy.pyx", line 35, in kivy.weakproxy.WeakProxy.setattr File "kivy/properties.pyx", line 520, in kivy.properties.Property.set File "kivy/properties.pyx", line 564, in kivy.properties.Property.set File "kivy/properties.pyx", line 555, in kivy.properties.Property.set File "kivy/properties.pyx", line 1354, in kivy.properties.OptionProperty.check
^C Exception ignored in: <module 'threading' from '/usr/lib/python3.7/threading.py'> Traceback (most recent call last): File "/usr/lib/python3.7/threading.py", line 1281, in _shutdown t.join() File "/usr/lib/python3.7/threading.py", line 1032, in join self._wait_for_tstate_lock() File "/usr/lib/python3.7/threading.py", line 1048, in _wait_for_tstate_lock elif lock.acquire(block, timeout): KeyboardInterrupt
Hi Jamie,
that error is being caused by the orientation field being wrong in main.ky line 916 i think it is, updates in kivy etc. have meant that the vertical is no longer valid and it needs to be changed to lr-tab
914: do_scroll_y: True 915: GridLayout: # Can handle 10 DTCs for now > 916: orientation: "vertical" 917: size_hint_y: None 918: height: self.minimum_height ... ValueError: GridLayout.orientation is set to an invalid option 'vertical'. Must be one of: ['lr-tb', 'tb-lr', 'rl-tb', 'tb-rl', 'lr-bt', 'bt-lr',
so change line 916 to:
916: orientation: "lr-tb"
and that should resolve that issue, i only found 2 issues preventing it from running
best regards, Dave
On Mon, 5 Jul 2021 at 12:08, jamiegrady @.***> wrote:
This is my error message with the Window.size = (800, 400) commented out.
@.**:~ $ sh launcher.sh [INFO ] [Logger ] Record log in /root/.kivy/logs/kivy_21-07-05_6.txt [INFO ] [Kivy ] v2.1.0.dev0 [INFO ] [Kivy ] Installed at "/usr/local/lib/python3.7/dist-packages/kivy/ init.py" [INFO ] [Python ] v3.7.3 (default, Jan 22 2021, 20:04:44) [GCC 8.3.0] [INFO ] [Python ] Interpreter at "/usr/bin/python3" [INFO ] [Logger ] Purge log fired. Processing... [INFO ] [Logger ] Purge finished! [INFO ] [Factory ] 189 symbols loaded [INFO ] [Image ] Providers: img_tex, img_dds, img_sdl2, img_pil (img_ffpyplayer ignored) [INFO ] [Text ] Provider: sdl2 [INFO ] [Window ] Provider: egl_rpi [INFO ] [GL ] Using the "OpenGL ES 2" graphics system [INFO ] [GL ] Backend used [INFO ] [GL ] OpenGL version <b'OpenGL ES 2.0'> [INFO ] [GL ] OpenGL vendor <b'Broadcom'> [INFO ] [GL ] OpenGL renderer <b'VideoCore IV HW'> [INFO ] [GL ] OpenGL parsed version: 2, 0 [INFO ] [GL ] Shading version <b'OpenGL ES GLSL ES 1.00'> [INFO ] [GL ] Texture max size <2048> [INFO ] [GL ] Texture max units <8> [INFO ] [Window ] virtual keyboard not allowed, single mode, not docked Can't create device: Address already in use RF Bind Complete [INFO ] [GL ] NPOT texture support is available Error setting OBD vars. OBD is now disabled. Dialog could not open, no window? [ERROR ] [Image ] Not found <data/elements/BrightnessRibbon/Ribbon.png> [ERROR ] [Image ] Not found <data/elements/Dock/Dock.png> [ERROR ] [Image ] Not found <data/elements/Gradient/gradient.png> Traceback (most recent call last): File "/usr/local/lib/python3.7/dist-packages/kivy/lang/builder.py", line 706, in _apply_rule setattr(widget_set, key, value) File "kivy/weakproxy.pyx", line 35, in kivy.weakproxy.WeakProxy.setattr File "kivy/properties.pyx", line 520, in kivy.properties.Property.set* File "kivy/properties.pyx", line 564, in kivy.properties.Property.set File "kivy/properties.pyx", line 555, in kivy.properties.Property.set File "kivy/properties.pyx", line 1354, in kivy.properties.OptionProperty.check ValueError: GridLayout.orientation is set to an invalid option 'vertical'. Must be one of: ['lr-tb', 'tb-lr', 'rl-tb', 'tb-rl', 'lr-bt', 'bt-lr', 'rl-bt', 'bt-rl']
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "main.py", line 1008, in MainApp().run() File "/usr/local/lib/python3.7/dist-packages/kivy/app.py", line 954, in run self._run_prepare() File "/usr/local/lib/python3.7/dist-packages/kivy/app.py", line 923, in _run_prepare self.load_kv(filename=self.kv_file) File "/usr/local/lib/python3.7/dist-packages/kivy/app.py", line 696, in load_kv root = Builder.load_file(rfilename) File "/usr/local/lib/python3.7/dist-packages/kivy/lang/builder.py", line 307, in load_file return self.load_string(data, **kwargs) File "/usr/local/lib/python3.7/dist-packages/kivy/lang/builder.py", line 411, in load_string rule_children=rule_children) File "/usr/local/lib/python3.7/dist-packages/kivy/lang/builder.py", line 713, in _apply_rule e), cause=tb) kivy.lang.builder.BuilderException: Parser: File "/home/pi/DRDS/main.kv", line 916: ... 914: do_scroll_y: True 915: GridLayout: # Can handle 10 DTCs for now
916: orientation: "vertical" 917: size_hint_y: None 918: height: self.minimum_height ... ValueError: GridLayout.orientation is set to an invalid option 'vertical'. Must be one of: ['lr-tb', 'tb-lr', 'rl-tb', 'tb-rl', 'lr-bt', 'bt-lr', 'rl-bt', 'bt-rl'] File "/usr/local/lib/python3.7/dist-packages/kivy/lang/builder.py", line 706, in _apply_rule setattr(widget_set, key, value) File "kivy/weakproxy.pyx", line 35, in kivy.weakproxy.WeakProxy.setattr File "kivy/properties.pyx", line 520, in kivy.properties.Property.set File "kivy/properties.pyx", line 564, in kivy.properties.Property.set File "kivy/properties.pyx", line 555, in kivy.properties.Property.set File "kivy/properties.pyx", line 1354, in kivy.properties.OptionProperty.check
^C Exception ignored in: <module 'threading' from '/usr/lib/python3.7/threading.py'> Traceback (most recent call last): File "/usr/lib/python3.7/threading.py", line 1281, in _shutdown t.join() File "/usr/lib/python3.7/threading.py", line 1032, in join self._wait_for_tstate_lock() File "/usr/lib/python3.7/threading.py", line 1048, in _wait_for_tstate_lock elif lock.acquire(block, timeout): KeyboardInterrupt
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Joelzeller/DigitalRaceDashSlim/issues/1#issuecomment-874025498, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANL4FZXDMBXHBOMQJ4DO7H3TWGHBHANCNFSM45CBP7DQ .
Genius! It works now thank you.
How did you manage to change the screen size though?
excellent, initially i used it with an ebay 800x600 LCD/touchscreen and just changed the screen position of the various gauges and background images in main.kv but since the touchscreen didn't work and i found out there are difficulties in using some touchscreens with kivy, i purchased a genuine pi LCD 800x480 which just works fine with the genuine pi touchscreen.
On Mon, 5 Jul 2021 at 13:17, jamiegrady @.***> wrote:
Genius! It works now thank you.
How did you manage to change the screen size though?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Joelzeller/DigitalRaceDashSlim/issues/1#issuecomment-874067937, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANL4FZRPR3V56P27JLZO2ITTWGPDZANCNFSM45CBP7DQ .
confirmed that this does resolve.
hi, i'm having an issue with the create window takes 1 positional argument but 2 were given. I did the fix for the orientation but now this won't let me proceed any further. I don't know anything about code but am doing this project because I love working on cars. this is the last few lines of what i'm getting
Traceback (most recent call last):
File "main.py", line 1008, in
I got this to work a couple weeks ago but for whatever reason when i went to run it today, i started getting that error, fresh install of OS and reinstalled everything yet it still remains. Please help
hi, i'm having an issue with the create window takes 1 positional argument but 2 were given. I did the fix for the orientation but now this won't let me proceed any further. I don't know anything about code but am doing this project because I love working on cars. this is the last few lines of what i'm getting Traceback (most recent call last): File "main.py", line 1008, in MainApp().run() File "/home/pi/DRDS/kivy/app.py", line 956, in run runTouchApp() File "/home/pi/DRDS/kivy/base.py", line 574, in runTouchApp EventLoop.mainloop() File "/home/pi/DRDS/kivy/base.py", line 339, in mainloop self.idle() File "/home/pi/DRDS/kivy/base.py", line 379, in idle Clock.tick() File "/home/pi/DRDS/kivy/clock.py", line 733, in tick self.post_idle(ts, self.idle()) File "/home/pi/DRDS/kivy/clock.py", line 776, in post_idle self._process_events() File "kivy/_clock.pyx", line 620, in kivy._clock.CyClockBase._process_events File "kivy/_clock.pyx", line 653, in kivy._clock.CyClockBase._process_events File "kivy/_clock.pyx", line 649, in kivy._clock.CyClockBase._process_events File "kivy/_clock.pyx", line 218, in kivy._clock.ClockEvent.tick TypeError: create_window() takes 1 positional argument but 2 were given
I got this to work a couple weeks ago but for whatever reason when i went to run it today, i started getting that error, fresh install of OS and reinstalled everything yet it still remains. Please help
whole line of code if it helps
sudo python3 main.py
[INFO ] [Logger ] Record log in /root/.kivy/logs/kivy_23-10-27_1.txt
[INFO ] [Kivy ] v2.2.1
[INFO ] [Kivy ] Installed at "/home/pi/DRDS/kivy/init.py"
[INFO ] [Python ] v3.7.3 (default, Oct 11 2023, 09:51:27)
[GCC 8.3.0]
[INFO ] [Python ] Interpreter at "/usr/bin/python3"
[INFO ] [Logger ] Purge log fired. Processing...
[INFO ] [Logger ] Purge finished!
[INFO ] [Factory ] 190 symbols loaded
[INFO ] [Image ] Providers: img_tex, img_dds, img_pil (img_sdl2, img_ffpyplayer ignored)
[INFO ] [Text ] Provider: pil(['text_sdl2'] ignored)
[INFO ] [Window ] Provider: egl_rpi
[INFO ] [GL ] Using the "OpenGL ES 2" graphics system
[INFO ] [GL ] Backend used
it seems to be particularly hard to get this running with the latest pi updates and kivy version, initially an issue with window orientation as 'vertical' is no longer supported by kivy version 1.10 and above and then an issue with window creation requiring 1 argment not 2 that i've failed to track down as of yet....
any suggestions of how to get this to run on newer kivy version gratefully received.
for the record, have tried kivy1.9 (before the orientation format changes) but that fails dismally to install on pi with latest python updates....