wip
This commit is contained in:
@@ -162,13 +162,22 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
printf("ctx: %p\n", the_ctx);
|
||||
/* Add the UBus to the model exposed. */
|
||||
ubus_add_object(the_ctx, &the_capabilities);
|
||||
ubus_add_object(the_ctx, &the_lights);
|
||||
ubus_add_object(the_ctx, &the_shutters);
|
||||
ubus_add_object(the_ctx, &the_sprinklers);
|
||||
ubus_add_object(the_ctx, &the_sequences);
|
||||
the_ret = ubus_add_object(the_ctx, &the_capabilities);
|
||||
if (the_ret != UBUS_STATUS_OK)
|
||||
{
|
||||
fprintf (stderr, "Failed to register: %d\n", the_ret);
|
||||
return -2;
|
||||
}
|
||||
if (ubus_add_object(the_ctx, &the_lights) != UBUS_STATUS_OK)
|
||||
return -2;
|
||||
if (ubus_add_object(the_ctx, &the_shutters) != UBUS_STATUS_OK)
|
||||
return -2;
|
||||
if (ubus_add_object(the_ctx, &the_sprinklers) != UBUS_STATUS_OK)
|
||||
return -2;
|
||||
if (ubus_add_object(the_ctx, &the_sequences) != UBUS_STATUS_OK)
|
||||
return -2;
|
||||
|
||||
/* Main Event Loop. */
|
||||
uloop_run();
|
||||
|
||||
@@ -237,7 +237,7 @@ void Sequence::stop(void)
|
||||
bool Sequence::switch_to_next_action(DevicesManager *a_device_manager)
|
||||
{
|
||||
printf("switch_to_next_action current: %d, size: %ld\n", m_current_action, m_actions.size());
|
||||
if ((m_current_action + 1) >= m_actions.size())
|
||||
if ((m_current_action + 1) >= (uint16_t)m_actions.size())
|
||||
{
|
||||
printf("sequence is done.\n");
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user