mirror of
https://github.com/openmv/openmv.git
synced 2025-11-04 14:49:50 +08:00
Merge pull request #2523 from kwagyeman/kwabena/fix_ioctl_names
scripts/examples: Fix new refactored IOCTL names.
This commit is contained in:
commit
c3d6fc95ec
@ -37,9 +37,9 @@ print("Resetting Lepton...")
|
|||||||
# These settings are applied on reset
|
# These settings are applied on reset
|
||||||
sensor.reset()
|
sensor.reset()
|
||||||
# Enable measurement mode with high temp
|
# Enable measurement mode with high temp
|
||||||
sensor.ioctl(sensor.IOCTL_LEPTON_SET_MEASUREMENT_MODE, True, True)
|
sensor.ioctl(sensor.IOCTL_LEPTON_SET_MODE, True, True)
|
||||||
sensor.ioctl(
|
sensor.ioctl(
|
||||||
sensor.IOCTL_LEPTON_SET_MEASUREMENT_RANGE, min_temp_in_celsius, max_temp_in_celsius
|
sensor.IOCTL_LEPTON_SET_RANGE, min_temp_in_celsius, max_temp_in_celsius
|
||||||
)
|
)
|
||||||
print(
|
print(
|
||||||
"Lepton Res (%dx%d)"
|
"Lepton Res (%dx%d)"
|
||||||
@ -86,5 +86,5 @@ while True:
|
|||||||
)
|
)
|
||||||
print(
|
print(
|
||||||
"FPS %f - Lepton Temp: %f C"
|
"FPS %f - Lepton Temp: %f C"
|
||||||
% (clock.fps(), sensor.ioctl(sensor.IOCTL_LEPTON_GET_FPA_TEMPERATURE))
|
% (clock.fps(), sensor.ioctl(sensor.IOCTL_LEPTON_GET_FPA_TEMP))
|
||||||
)
|
)
|
||||||
|
|||||||
@ -34,9 +34,9 @@ max_temp_in_celsius = 35.0
|
|||||||
print("Resetting Lepton...")
|
print("Resetting Lepton...")
|
||||||
# These settings are applied on reset
|
# These settings are applied on reset
|
||||||
sensor.reset()
|
sensor.reset()
|
||||||
sensor.ioctl(sensor.IOCTL_LEPTON_SET_MEASUREMENT_MODE, True)
|
sensor.ioctl(sensor.IOCTL_LEPTON_SET_MODE, True)
|
||||||
sensor.ioctl(
|
sensor.ioctl(
|
||||||
sensor.IOCTL_LEPTON_SET_MEASUREMENT_RANGE, min_temp_in_celsius, max_temp_in_celsius
|
sensor.IOCTL_LEPTON_SET_RANGE, min_temp_in_celsius, max_temp_in_celsius
|
||||||
)
|
)
|
||||||
print(
|
print(
|
||||||
"Lepton Res (%dx%d)"
|
"Lepton Res (%dx%d)"
|
||||||
@ -83,5 +83,5 @@ while True:
|
|||||||
)
|
)
|
||||||
print(
|
print(
|
||||||
"FPS %f - Lepton Temp: %f C"
|
"FPS %f - Lepton Temp: %f C"
|
||||||
% (clock.fps(), sensor.ioctl(sensor.IOCTL_LEPTON_GET_FPA_TEMPERATURE))
|
% (clock.fps(), sensor.ioctl(sensor.IOCTL_LEPTON_GET_FPA_TEMP))
|
||||||
)
|
)
|
||||||
|
|||||||
@ -35,9 +35,9 @@ max_temp_in_celsius = 35.0
|
|||||||
print("Resetting Lepton...")
|
print("Resetting Lepton...")
|
||||||
# These settings are applied on reset
|
# These settings are applied on reset
|
||||||
sensor.reset()
|
sensor.reset()
|
||||||
sensor.ioctl(sensor.IOCTL_LEPTON_SET_MEASUREMENT_MODE, True)
|
sensor.ioctl(sensor.IOCTL_LEPTON_SET_MODE, True)
|
||||||
sensor.ioctl(
|
sensor.ioctl(
|
||||||
sensor.IOCTL_LEPTON_SET_MEASUREMENT_RANGE, min_temp_in_celsius, max_temp_in_celsius
|
sensor.IOCTL_LEPTON_SET_RANGE, min_temp_in_celsius, max_temp_in_celsius
|
||||||
)
|
)
|
||||||
print(
|
print(
|
||||||
"Lepton Res (%dx%d)"
|
"Lepton Res (%dx%d)"
|
||||||
@ -98,5 +98,5 @@ while True:
|
|||||||
)
|
)
|
||||||
print(
|
print(
|
||||||
"FPS %f - Lepton Temp: %f C"
|
"FPS %f - Lepton Temp: %f C"
|
||||||
% (clock.fps(), sensor.ioctl(sensor.IOCTL_LEPTON_GET_FPA_TEMPERATURE))
|
% (clock.fps(), sensor.ioctl(sensor.IOCTL_LEPTON_GET_FPA_TEMP))
|
||||||
)
|
)
|
||||||
|
|||||||
@ -36,9 +36,9 @@ max_temp_in_celsius = 35.0
|
|||||||
print("Resetting Lepton...")
|
print("Resetting Lepton...")
|
||||||
# These settings are applied on reset
|
# These settings are applied on reset
|
||||||
sensor.reset()
|
sensor.reset()
|
||||||
sensor.ioctl(sensor.IOCTL_LEPTON_SET_MEASUREMENT_MODE, True)
|
sensor.ioctl(sensor.IOCTL_LEPTON_SET_MODE, True)
|
||||||
sensor.ioctl(
|
sensor.ioctl(
|
||||||
sensor.IOCTL_LEPTON_SET_MEASUREMENT_RANGE, min_temp_in_celsius, max_temp_in_celsius
|
sensor.IOCTL_LEPTON_SET_RANGE, min_temp_in_celsius, max_temp_in_celsius
|
||||||
)
|
)
|
||||||
print(
|
print(
|
||||||
"Lepton Res (%dx%d)"
|
"Lepton Res (%dx%d)"
|
||||||
@ -101,5 +101,5 @@ while True:
|
|||||||
lcd.write(img)
|
lcd.write(img)
|
||||||
print(
|
print(
|
||||||
"FPS %f - Lepton Temp: %f C"
|
"FPS %f - Lepton Temp: %f C"
|
||||||
% (clock.fps(), sensor.ioctl(sensor.IOCTL_LEPTON_GET_FPA_TEMPERATURE))
|
% (clock.fps(), sensor.ioctl(sensor.IOCTL_LEPTON_GET_FPA_TEMP))
|
||||||
)
|
)
|
||||||
|
|||||||
@ -35,9 +35,9 @@ max_temp_in_celsius = 35.0
|
|||||||
print("Resetting Lepton...")
|
print("Resetting Lepton...")
|
||||||
# These settings are applied on reset
|
# These settings are applied on reset
|
||||||
sensor.reset()
|
sensor.reset()
|
||||||
sensor.ioctl(sensor.IOCTL_LEPTON_SET_MEASUREMENT_MODE, True)
|
sensor.ioctl(sensor.IOCTL_LEPTON_SET_MODE, True)
|
||||||
sensor.ioctl(
|
sensor.ioctl(
|
||||||
sensor.IOCTL_LEPTON_SET_MEASUREMENT_RANGE, min_temp_in_celsius, max_temp_in_celsius
|
sensor.IOCTL_LEPTON_SET_RANGE, min_temp_in_celsius, max_temp_in_celsius
|
||||||
)
|
)
|
||||||
print(
|
print(
|
||||||
"Lepton Res (%dx%d)"
|
"Lepton Res (%dx%d)"
|
||||||
@ -86,5 +86,5 @@ while True:
|
|||||||
lcd.write(img)
|
lcd.write(img)
|
||||||
print(
|
print(
|
||||||
"FPS %f - Lepton Temp: %f C"
|
"FPS %f - Lepton Temp: %f C"
|
||||||
% (clock.fps(), sensor.ioctl(sensor.IOCTL_LEPTON_GET_FPA_TEMPERATURE))
|
% (clock.fps(), sensor.ioctl(sensor.IOCTL_LEPTON_GET_FPA_TEMP))
|
||||||
)
|
)
|
||||||
|
|||||||
@ -34,9 +34,9 @@ max_temp_in_celsius = 32
|
|||||||
print("Resetting Lepton...")
|
print("Resetting Lepton...")
|
||||||
# These settings are applied on reset
|
# These settings are applied on reset
|
||||||
sensor.reset()
|
sensor.reset()
|
||||||
sensor.ioctl(sensor.IOCTL_LEPTON_SET_MEASUREMENT_MODE, True)
|
sensor.ioctl(sensor.IOCTL_LEPTON_SET_MODE, True)
|
||||||
sensor.ioctl(
|
sensor.ioctl(
|
||||||
sensor.IOCTL_LEPTON_SET_MEASUREMENT_RANGE, min_temp_in_celsius, max_temp_in_celsius
|
sensor.IOCTL_LEPTON_SET_RANGE, min_temp_in_celsius, max_temp_in_celsius
|
||||||
)
|
)
|
||||||
print(
|
print(
|
||||||
"Lepton Res (%dx%d)"
|
"Lepton Res (%dx%d)"
|
||||||
@ -69,5 +69,5 @@ while True:
|
|||||||
img.draw_cross(blob.cx(), blob.cy(), color=127)
|
img.draw_cross(blob.cx(), blob.cy(), color=127)
|
||||||
print(
|
print(
|
||||||
"FPS %f - Lepton Temp: %f C"
|
"FPS %f - Lepton Temp: %f C"
|
||||||
% (clock.fps(), sensor.ioctl(sensor.IOCTL_LEPTON_GET_FPA_TEMPERATURE))
|
% (clock.fps(), sensor.ioctl(sensor.IOCTL_LEPTON_GET_FPA_TEMP))
|
||||||
)
|
)
|
||||||
|
|||||||
@ -35,9 +35,9 @@ max_temp_in_celsius = 32
|
|||||||
print("Resetting Lepton...")
|
print("Resetting Lepton...")
|
||||||
# These settings are applied on reset
|
# These settings are applied on reset
|
||||||
sensor.reset()
|
sensor.reset()
|
||||||
sensor.ioctl(sensor.IOCTL_LEPTON_SET_MEASUREMENT_MODE, True)
|
sensor.ioctl(sensor.IOCTL_LEPTON_SET_MODE, True)
|
||||||
sensor.ioctl(
|
sensor.ioctl(
|
||||||
sensor.IOCTL_LEPTON_SET_MEASUREMENT_RANGE, min_temp_in_celsius, max_temp_in_celsius
|
sensor.IOCTL_LEPTON_SET_RANGE, min_temp_in_celsius, max_temp_in_celsius
|
||||||
)
|
)
|
||||||
print(
|
print(
|
||||||
"Lepton Res (%dx%d)"
|
"Lepton Res (%dx%d)"
|
||||||
@ -72,5 +72,5 @@ while True:
|
|||||||
img.draw_cross(blob.cx(), blob.cy())
|
img.draw_cross(blob.cx(), blob.cy())
|
||||||
print(
|
print(
|
||||||
"FPS %f - Lepton Temp: %f C"
|
"FPS %f - Lepton Temp: %f C"
|
||||||
% (clock.fps(), sensor.ioctl(sensor.IOCTL_LEPTON_GET_FPA_TEMPERATURE))
|
% (clock.fps(), sensor.ioctl(sensor.IOCTL_LEPTON_GET_FPA_TEMP))
|
||||||
)
|
)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user