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

fix: overflow error #173

Merged
merged 1 commit into from
Jan 11, 2024
Merged

fix: overflow error #173

merged 1 commit into from
Jan 11, 2024

Conversation

ldicarlo
Copy link
Contributor

Currently on my computer it displays an error message:

44 | const NUM_DISPLAY_BYTES: usize = WIDTH as usize  * HEIGHT as usize /8;
   |                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ attempt to compute `800_usize * 480_usize`, which would overflow

as said in #151.
This a fix to this error (when compiling for arduino, in my case).

Currently on my computer it displays an error message: 
```
44 | const NUM_DISPLAY_BYTES: usize = WIDTH as usize  * HEIGHT as usize /8;
   |                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ attempt to compute `800_usize * 480_usize`, which would overflow
```
as said in caemor#151.
This a fix to this error (when compiling for arduino, in my case).
@auto-assign auto-assign bot requested a review from caemor October 12, 2023 12:10
@tippfehlr
Copy link
Contributor

What target are you compiling for? (which arduino?)

My problem as in #151 was that the buffer doesn’t fit in my memory (of an Arduino Nano) at all.

@ldicarlo
Copy link
Contributor Author

Ok. Mine is an Arduino Uno. But I may have complety misunderstood the whole config.
I use arduino-hal and ravedude but I am kind of lost between all the tools I am using.

What I know is that when I git clone this repo and use it as a dependency, it compile only with this version. In the master version, I get the same error as you in #151

@tippfehlr
Copy link
Contributor

I also use ardino-hal and ravedude (I don’t know if this even could be run with another hal or if there exists another good one)

You shouldn’t need to clone the repo for normal use though. Just add it with cargo add epd-waveshare (except when you are developing on it ofc)

@caemor
Copy link
Owner

caemor commented Jan 11, 2024

Thanks!

@caemor caemor merged commit 197d327 into caemor:main Jan 11, 2024
2 checks passed
tippfehlr added a commit to tippfehlr/epd-waveshare that referenced this pull request Jan 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants