This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Enocean Mesh example for dimming using PWM

Hi,

I need to use 

 p_status->action == RELEASE_ACTION

to set the brightness level, but the p_status->action only gets updated after the loop finish so:

 if (p_status->action == RELEASE_ACTION) break;

doesn't break the loops to increase or decrease the PWM duty cycle changes.

how can I update the p_status->action in the middle of the loop?

main c: www.dropbox.com/.../main.c

Parents Reply Children
  • We tried but there it say to check the button value witch makes no sense, there is no button on this EnOcean... the only thing we have is the p_status variable that "should" store the PRESS_ACTION or the RELEASE_ACTION... but its not updated inside the bounce so he say to make another variable that will use PRESS_ACTION to store "1" and RELEASE_ACTION to sore "0" which doesn't work because RELEASE_ACTION is not updated until the whole ...debounce... runs... so it will not go to "0" either...

    RELEASE_ACTION its stored somewhere since it doesn't matter how long the delay is, we can see on the debug terminal the RELEASE_ACTION afterwards...

    So the questions remains... how can we access that one?

  • hey!, So I have tried many things, adding another variables to store ACTION_CHANCE for example, or moving the PWM loop to the app_enooan_cb that calls app_switch_debounce, nothing works... as soon as I make any loop the p_status->action or status.action doesn't get updated...

    PS, and on the other ticket there is no news on the last 4 days either...

Related