fix some shit

This commit is contained in:
yelvlab 2024-12-03 16:00:35 +08:00
parent 0a85320c68
commit 0398076df2
2 changed files with 1 additions and 6 deletions

View File

@ -33,8 +33,6 @@ find_program(CMAKE_OBJCOPY NAMES ${TARGET_TRIPLET}-objcopy HINTS ${TOOLCHAIN_BIN
find_program(CMAKE_OBJDUMP NAMES ${TARGET_TRIPLET}-objdump HINTS ${TOOLCHAIN_BIN_PATH})
find_program(CMAKE_SIZE NAMES ${TARGET_TRIPLET}-size HINTS ${TOOLCHAIN_BIN_PATH})
function(print_size_of_target TARGET)
add_custom_target(${TARGET}_always_display_size
ALL COMMAND ${CMAKE_SIZE} "$<TARGET_FILE:${TARGET}>"

View File

@ -35,9 +35,6 @@ int main(void)
/* ---------- debug start ---------- */
/* ---------- debug end ---------- */
printf("\r\n");
@ -52,12 +49,12 @@ int main(void)
UltraSonic_PwmOut_Cycles(ULTRASONIC_CYCLES);
delay_ms(2);
// printf("cap_val:%ld\t", g_capture_value);
// const char* result = (g_capture_value <= CAPTURE_VALUE_MAX) ? "Distance: %d\t" : "Over Range\t";
if (g_capture_value <= CAPTURE_VALUE_MAX) {
g_distance_uint16 = UltraSonic_CalcDistance(g_capture_value);
} else {
g_distance_uint16 = 0x0000;
}
// const char* result = (g_capture_value <= CAPTURE_VALUE_MAX) ? "Distance: %d\t" : "Over Range\t";
// printf(result, distance_uint16);
// printf("Temp:%d\n", MLX90614_GetObjectTemperature());