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

bug fix #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

eyal-rounds
Copy link

  1. special command should check > and < and not ==
    0x90 for instance cannot have the first bit to be 1!
  2. _prepareAddress should first check if it's special command and if so
    it should not change the address byte!
  3. changing the daliState to "sending" assumes the send_cmd can finish
    it's job BEFORE the interrupt starts or before the ticks get to the
    needed byte, it's not always the case, better change it only AFTER the
    prepration is done.
  4. the loop that prepares the first byte of the command array puts a '0'
    into the first byte 8 times. it should not.... and it should work on 16
    bytes, not 9.
  5. the byte array (as bits) of command is 17 bytes long suitable for 17 bits == 1 start bit and 16 command bits, there for the code that is special for sending the start bit in the "sendingData" function is useless

1. special command should check > and < and not ==
   0x90 for instance cannot have the first bit to be 1!
2. _prepareAddress should first check if it's special command and if so
   it should not change the address byte!
3. changing the daliState to "sending" assumes the send_cmd can finish
   it's job BEFORE the interrupt starts or before the ticks get to the
needed byte, it's not always the case, better change it only AFTER the
prepration is done.
4. the loop that prepares the first byte of the command array puts a '0'
into the first byte 8 times. it should not.... and it should work on 16
bytes, not 9.
@Ruggyo
Copy link

Ruggyo commented Oct 28, 2022

Hi, can you share the hex file, hope for PIC32MX...

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