bartoszbielawski / LEDMatrixDriver

A replacement for Arduino's LedControl library
MIT License
74 stars 25 forks source link

More scroll options #37

Closed quakec closed 4 years ago

quakec commented 5 years ago

void LEDMatrixDriver::scroll( scrollDirection direction ) is very useful, but everything is scrolling away and gone forever.

Might I suggest an optional parameter to the scroll function which "wraps" the lost pixels back to the other side of the matrix display, so it appears continuous. I think this is quite a low-level feature which would open up the driver to have more potential for animations.

bartoszbielawski commented 5 years ago

Let me check how complex would it be...

quakec commented 5 years ago

Yes direction and detecting the lost byte after shift, but you know which bytes will be discarded and can store them in a temp var before the shift.

The complications arise when you have to take into account the x/y/segment flips ;)

J

On Fri, 5 Jul 2019 at 21:52, Bartosz Bielawski notifications@github.com wrote:

Let me check how complex would it be...

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/bartoszbielawski/LEDMatrixDriver/issues/37?email_source=notifications&email_token=AANUS3Y2SSCJZITBYJCSGWDP56X75A5CNFSM4H6NWRIKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZKJM3I#issuecomment-508860013, or mute the thread https://github.com/notifications/unsubscribe-auth/AANUS3ZWJMWYB2XZ74JAN5LP56X75ANCNFSM4H6NWRIA .

-- Sent from my iPhone 6s A1688 iOS 11.0.3

bartoszbielawski commented 5 years ago

Yes direction and detecting the lost byte after shift, but you know which bytes will be discarded and can store them in a temp var before the shift.

These are bytes for vertical scroll and bits for horizontal one.

The complications arise when you have to take into account the x/y/segment flips ;)

I think it doesn't matter, really. The memory layout is always the same, it's the display method that handles flips. That's why I wanted it done this way :)

bartoszbielawski commented 5 years ago

Do you have time to test the code? I have pushed a new branch: wrapped-scroll, it contains the changes. It works on my machine ;)

quakec commented 5 years ago

Will see if I can tomorrow evening I am swamped with projects at the moment my friend. Thank you for responding and implementing so quickly <3

On Sun, 7 Jul 2019 at 16:44, Bartosz Bielawski notifications@github.com wrote:

Do you have time to test the code? I have pushed a new branch: wrapped-scroll, it contains the changes. It works on my machine ;)

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/bartoszbielawski/LEDMatrixDriver/issues/37?email_source=notifications&email_token=AANUS3YDLAGJLWEOZZ3OVODP6IFMNA5CNFSM4H6NWRIKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZLN6IA#issuecomment-509009696, or mute the thread https://github.com/notifications/unsubscribe-auth/AANUS3YHNIRJYMEBEK5ZCS3P6IFMNANCNFSM4H6NWRIA .

-- Sent from my iPhone 6s A1688 iOS 11.0.3

bartoszbielawski commented 5 years ago

Take your time, I'm not in a hurry :)

quakec commented 4 years ago

My 7219 boards have stopped working together, must have damaged the copper pate when I removed pins before joining them together. I’ve ordered some more from China.

On Wed, 10 Jul 2019 at 23:18, Bartosz Bielawski notifications@github.com wrote:

Take your time, I'm not in a hurry :)

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/bartoszbielawski/LEDMatrixDriver/issues/37?email_source=notifications&email_token=AANUS3YSTFF5HUDBGHPV5CTP6ZN4VA5CNFSM4H6NWRIKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZU5JLY#issuecomment-510252207, or mute the thread https://github.com/notifications/unsubscribe-auth/AANUS353BTOOCWH65SYJOQ3P6ZN4VANCNFSM4H6NWRIA .

-- Sent from my iPhone 6s A1688 iOS 11.0.3

bartoszbielawski commented 4 years ago

My 7219 boards have stopped working together, must have damaged the copper pate when I removed pins before joining them together. I’ve ordered some more from China.

Bad luck... You can try to patch them up, remove the damaged segment. It will be weeks before new ones arrive... I will be on holidays by then ;)

quakec commented 4 years ago

Yes they will 😂 I can run in 4 segments for now to test. As you can see, a mess. There is no copper plating under the solder 😂

On Fri, 12 Jul 2019 at 08:49, Bartosz Bielawski notifications@github.com wrote:

My 7219 boards have stopped working together, must have damaged the copper pate when I removed pins before joining them together. I’ve ordered some more from China.

Bad luck... You can try to patch them up, remove the damaged segment. It will be weeks before new ones arrive... I will be on holidays by then ;)

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/bartoszbielawski/LEDMatrixDriver/issues/37?email_source=notifications&email_token=AANUS35GAYEO6X3QWAA7BR3P7AZQVA5CNFSM4H6NWRIKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZY73AI#issuecomment-510786945, or mute the thread https://github.com/notifications/unsubscribe-auth/AANUS35UAEE2XERWMBQ374DP7AZQVANCNFSM4H6NWRIA .

-- Sent from my iPhone 6s A1688 iOS 11.0.3

bartoszbielawski commented 4 years ago

Yes they will 😂 I can run in 4 segments for now to test. As you can see, a mess. There is no copper plating under the solder 😂

I have a test setup with hand-soldered 5x1 display :) It's useful to check if I didn't make a mistake rounding somewhere to the nearest power of 2 ;)

quakec commented 4 years ago

Good call!

Testing this now, just while I remember though...

void scroll( scrollDirection direction, bool wrap=true);

Default false, would be the prefered, since the feature didn't exist previously. But I know you know that :)

quakec commented 4 years ago

Okay this is me writing to confirm that it is working nicely :)

bartoszbielawski commented 4 years ago

Great! Then I fix the header (I wanted it to be false, why did I put true?) and merge the code.

quakec commented 4 years ago

Great :) You're only human :D (I hope so) Okay I'm thinking the driver could maybe do with a tiny example with some chevrons <<<< scrolling just to expose the feature.

bartoszbielawski commented 4 years ago

I already made an example with some scrolling stripes. Maybe <>s are better...