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