Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions examples/projects/l0/led_strip/lib/Led_strip/led_strip.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,12 @@ void LedStrip_Loop(void)
******************************************************************************/
static void LedStrip_MsgHandler(service_t *service, const msg_t *msg)
{

static bool img_complete = true;
if (msg->header.cmd == COLOR)
{
// change led target color
if (msg->header.size == 3)
if (msg->header.size == 3 && img_complete)
{
// there is only one color copy it in the entire matrix
for (int i = 0; i < imgsize; i++)
Expand All @@ -69,7 +71,7 @@ static void LedStrip_MsgHandler(service_t *service, const msg_t *msg)
else
{
// image management
Luos_ReceiveData(service, msg, (void *)matrix);
img_complete = Luos_ReceiveData(service, msg, (void *)matrix) != 0;
}
return;
}
Expand Down
1 change: 0 additions & 1 deletion examples/projects/l0/led_strip/lib/Led_strip/led_strip.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#define LED_STRIP_H

#include "luos_engine.h"
#include "robus_network.h"

/*******************************************************************************
* Definitions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
#include "main.h"
#include "tim.h"
#include "luos_engine.h"
#include "robus_network.h"
/*******************************************************************************
* Definitions
******************************************************************************/
Expand Down