Fixed Lighting Output unit test builds after recent fixes added debug printing and implicit float to double promotion.
This commit is contained in:
@@ -458,6 +458,9 @@ retest:
|
|||||||
TWISTER_RESULTS=../twister-out.unit_testing
|
TWISTER_RESULTS=../twister-out.unit_testing
|
||||||
.PHONY: twister
|
.PHONY: twister
|
||||||
twister:
|
twister:
|
||||||
|
ifndef ZEPHYR_BASE
|
||||||
|
$(error ZEPHYR_BASE is undefined)
|
||||||
|
endif
|
||||||
$(ZEPHYR_BASE)/scripts/twister -O $(TWISTER_RESULTS) -p unit_testing -T zephyr/tests
|
$(ZEPHYR_BASE)/scripts/twister -O $(TWISTER_RESULTS) -p unit_testing -T zephyr/tests
|
||||||
|
|
||||||
.PHONY: twister-clean
|
.PHONY: twister-clean
|
||||||
|
|||||||
@@ -997,7 +997,7 @@ static bool Lighting_Output_Lighting_Command_Write(
|
|||||||
debug_printf("LO[%u]: Lighting-Command@%u Fade-To "
|
debug_printf("LO[%u]: Lighting-Command@%u Fade-To "
|
||||||
"Target=%f Fade=%u\n",
|
"Target=%f Fade=%u\n",
|
||||||
object_instance, priority,
|
object_instance, priority,
|
||||||
value->target_level, value->fade_time);
|
(double)value->target_level, value->fade_time);
|
||||||
Lighting_Command_Fade_To(pObject, priority,
|
Lighting_Command_Fade_To(pObject, priority,
|
||||||
value->target_level, value->fade_time);
|
value->target_level, value->fade_time);
|
||||||
status = true;
|
status = true;
|
||||||
@@ -1006,7 +1006,7 @@ static bool Lighting_Output_Lighting_Command_Write(
|
|||||||
debug_printf("LO[%u]: Lighting-Command@%u Ramp-To "
|
debug_printf("LO[%u]: Lighting-Command@%u Ramp-To "
|
||||||
"Target=%f Ramp-Rate=%f\n",
|
"Target=%f Ramp-Rate=%f\n",
|
||||||
object_instance, priority,
|
object_instance, priority,
|
||||||
value->target_level, value->ramp_rate);
|
(double)value->target_level, (double)value->ramp_rate);
|
||||||
Lighting_Command_Ramp_To(pObject, priority,
|
Lighting_Command_Ramp_To(pObject, priority,
|
||||||
value->target_level, value->ramp_rate);
|
value->target_level, value->ramp_rate);
|
||||||
status = true;
|
status = true;
|
||||||
@@ -1018,7 +1018,7 @@ static bool Lighting_Output_Lighting_Command_Write(
|
|||||||
debug_printf("LO[%u]: Lighting-Command@%u Step "
|
debug_printf("LO[%u]: Lighting-Command@%u Step "
|
||||||
"Step-Increment=%f\n",
|
"Step-Increment=%f\n",
|
||||||
object_instance, priority,
|
object_instance, priority,
|
||||||
value->step_increment);
|
(double)value->step_increment);
|
||||||
Lighting_Command_Step(pObject,priority,
|
Lighting_Command_Step(pObject,priority,
|
||||||
value->operation,value->step_increment);
|
value->operation,value->step_increment);
|
||||||
status = true;
|
status = true;
|
||||||
@@ -2307,7 +2307,7 @@ Lighting_Output_Fade_Handler(uint32_t object_instance, uint16_t milliseconds)
|
|||||||
object_instance,
|
object_instance,
|
||||||
bactext_lighting_operation_name(
|
bactext_lighting_operation_name(
|
||||||
pObject->Lighting_Command.operation),
|
pObject->Lighting_Command.operation),
|
||||||
pObject->Tracking_Value);
|
(double)pObject->Tracking_Value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2371,7 +2371,7 @@ Lighting_Output_Ramp_Handler(uint32_t object_instance, uint16_t milliseconds)
|
|||||||
}
|
}
|
||||||
} else if (isgreater(old_value, target_value)) {
|
} else if (isgreater(old_value, target_value)) {
|
||||||
debug_printf("LO[%u] Ramp Handler Down steps=%f tracking=%f\n",
|
debug_printf("LO[%u] Ramp Handler Down steps=%f tracking=%f\n",
|
||||||
object_instance, steps, old_value);
|
object_instance, (double)steps, (double)old_value);
|
||||||
if (isgreater(old_value, steps)) {
|
if (isgreater(old_value, steps)) {
|
||||||
step_value = old_value - steps;
|
step_value = old_value - steps;
|
||||||
} else {
|
} else {
|
||||||
@@ -2383,7 +2383,7 @@ Lighting_Output_Ramp_Handler(uint32_t object_instance, uint16_t milliseconds)
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
debug_printf("LO[%u] Ramp Handler at target=%f tracking=%f\n",
|
debug_printf("LO[%u] Ramp Handler at target=%f tracking=%f\n",
|
||||||
object_instance, target_value, old_value);
|
object_instance, (double)target_value, (double)old_value);
|
||||||
/* stop ramping */
|
/* stop ramping */
|
||||||
pObject->Lighting_Command.operation = BACNET_LIGHTS_STOP;
|
pObject->Lighting_Command.operation = BACNET_LIGHTS_STOP;
|
||||||
}
|
}
|
||||||
@@ -2410,7 +2410,7 @@ Lighting_Output_Ramp_Handler(uint32_t object_instance, uint16_t milliseconds)
|
|||||||
object_instance,
|
object_instance,
|
||||||
bactext_lighting_operation_name(
|
bactext_lighting_operation_name(
|
||||||
pObject->Lighting_Command.operation),
|
pObject->Lighting_Command.operation),
|
||||||
pObject->Tracking_Value);
|
(double)pObject->Tracking_Value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2458,7 +2458,7 @@ static void Lighting_Output_Step_Up_Handler(uint32_t object_instance)
|
|||||||
object_instance,
|
object_instance,
|
||||||
bactext_lighting_operation_name(
|
bactext_lighting_operation_name(
|
||||||
pObject->Lighting_Command.operation),
|
pObject->Lighting_Command.operation),
|
||||||
pObject->Tracking_Value);
|
(double)pObject->Tracking_Value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2509,7 +2509,7 @@ static void Lighting_Output_Step_Down_Handler(uint32_t object_instance)
|
|||||||
object_instance,
|
object_instance,
|
||||||
bactext_lighting_operation_name(
|
bactext_lighting_operation_name(
|
||||||
pObject->Lighting_Command.operation),
|
pObject->Lighting_Command.operation),
|
||||||
pObject->Tracking_Value);
|
(double)pObject->Tracking_Value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2555,7 +2555,7 @@ static void Lighting_Output_Step_On_Handler(uint32_t object_instance)
|
|||||||
object_instance,
|
object_instance,
|
||||||
bactext_lighting_operation_name(
|
bactext_lighting_operation_name(
|
||||||
pObject->Lighting_Command.operation),
|
pObject->Lighting_Command.operation),
|
||||||
pObject->Tracking_Value);
|
(double)pObject->Tracking_Value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2606,7 +2606,7 @@ static void Lighting_Output_Step_Off_Handler(uint32_t object_instance)
|
|||||||
object_instance,
|
object_instance,
|
||||||
bactext_lighting_operation_name(
|
bactext_lighting_operation_name(
|
||||||
pObject->Lighting_Command.operation),
|
pObject->Lighting_Command.operation),
|
||||||
pObject->Tracking_Value);
|
(double)pObject->Tracking_Value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -48,6 +48,7 @@ add_executable(${PROJECT_NAME}
|
|||||||
${SRC_DIR}/bacnet/basic/sys/bigend.c
|
${SRC_DIR}/bacnet/basic/sys/bigend.c
|
||||||
${SRC_DIR}/bacnet/basic/sys/days.c
|
${SRC_DIR}/bacnet/basic/sys/days.c
|
||||||
${SRC_DIR}/bacnet/basic/sys/color_rgb.c
|
${SRC_DIR}/bacnet/basic/sys/color_rgb.c
|
||||||
|
${SRC_DIR}/bacnet/basic/sys/debug.c
|
||||||
${SRC_DIR}/bacnet/basic/sys/keylist.c
|
${SRC_DIR}/bacnet/basic/sys/keylist.c
|
||||||
${SRC_DIR}/bacnet/basic/sys/linear.c
|
${SRC_DIR}/bacnet/basic/sys/linear.c
|
||||||
${SRC_DIR}/bacnet/datetime.c
|
${SRC_DIR}/bacnet/datetime.c
|
||||||
|
|||||||
@@ -57,6 +57,7 @@ if(BOARD STREQUAL unit_testing)
|
|||||||
${BACNET_SRC}/special_event.c
|
${BACNET_SRC}/special_event.c
|
||||||
${BACNET_SRC}/basic/sys/bigend.c
|
${BACNET_SRC}/basic/sys/bigend.c
|
||||||
${BACNET_SRC}/basic/sys/linear.c
|
${BACNET_SRC}/basic/sys/linear.c
|
||||||
|
${BACNET_SRC}/basic/sys/debug.c
|
||||||
${BACNET_SRC}/basic/sys/keylist.c
|
${BACNET_SRC}/basic/sys/keylist.c
|
||||||
${BACNET_SRC}/bactimevalue.c
|
${BACNET_SRC}/bactimevalue.c
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user