Commit Graph

2681 Commits

Author SHA1 Message Date
iabdalkader
b0a16d445e Update change log. 2019-03-23 22:28:19 +02:00
iabdalkader
46dc62fd49 Update firmware images. 2019-03-23 22:21:11 +02:00
Ibrahim Abd Elkader
91182114f9
Merge pull request #494 from openmv/fix_jpeg
Fix H7 JPEG encoder boundaries.
2019-03-22 23:49:55 +02:00
iabdalkader
367383d800 Fix H7 JPEG encoder boundaries. 2019-03-22 22:47:55 +02:00
Ibrahim Abd Elkader
971c0b203e
Merge pull request #493 from kidswong999/patch-3
BNO055 lib for IMU shield
2019-03-22 13:27:05 +02:00
王开智
4759335a51
bno055 lib for imu shield 2019-03-22 15:27:44 +08:00
Ibrahim Abd Elkader
d15a1e35bc
Merge pull request #492 from openmv/fix_nn
Fix NN enum sizes.
2019-03-21 18:59:50 +02:00
iabdalkader
340608cad5 Fix NN enum sizes.
* Fixes issue #491
* Since enums are now short, make sure NN layer types are 4 bytes.
2019-03-21 18:28:20 +02:00
iabdalkader
f62454e4c6 Fix firmware version number. 2019-03-21 17:20:55 +02:00
iabdalkader
5f6517068c Bump firmware version. 2019-03-18 20:14:29 +02:00
iabdalkader
10adefb7d8 Update change log. 2019-03-18 20:09:35 +02:00
iabdalkader
b0ac6176da Update firmware images. 2019-03-18 20:06:59 +02:00
Ibrahim Abd Elkader
c5d686cf03
Merge pull request #490 from openmv/clean_fbfree
Remove extra fb_free calls.
2019-03-18 18:20:36 +02:00
iabdalkader
75a028f9e9 Remove extra fb_free calls. 2019-03-18 17:37:18 +02:00
Ibrahim Abd Elkader
bd41774802
Merge pull request #489 from kwagyeman/kwabena/fb_extra_alloc_fix
Fix exceptions from freeing fb_alloc_mark
2019-03-18 17:08:09 +02:00
Kwabena W. Agyeman
c982617523 Fix exceptions from freeing fb_alloc_mark
This fix creates a flag that prevents fb_alloc_free_till_mark() from
doing anything unless there was a previous fb_alloc_mark(). Once
fb_alloc_free_till_mark() is called it will no longer do anything until
there's another fb_alloc_mark().

This means that if an exception is triggered while in code that
previously did fb_alloc_mark() the stack will be cleaned up.

If the fb_alloc_mark() method is not called then the stack will not be
cleaned up and that memory fb_alloc()'ed will remain until a soft reset.

All OpenMV Cam library code is designed to fb_alloc_mark() before using
the fb stack and then fb_alloc_free_till_mark() when complete. However,
in the case of py_sensor_alloc_extra_fb() it doesn't mark first such
that the RAM it allocates stays across exceptions and is only free'd via
py_sensor_dealloc_extra_fb() or via a soft reset.

...

Summary of changes:

fb_alloc.c -> Added a semaphore lock to prevent
fb_alloc_free_till_mark() from doing anything unless fb_alloc_mark() was
called first.

py_sensor.c -> Removed calling fb_alloc_mark() and
fb_alloc_free_till_mark() and re-arranged code calls to prevent a trival
leak sitatuion on heap exhaustion.

py_image.c, py_fir.c, py_lcd.c py_tv.c -> Added fb_alloc_mark() and
fb_alloc_free_till_mark() to methods originally coded without using it.

...

Note - I coded the mark semaphore lock in such a way things work even if
fb_alloc_mark() and fb_alloc_free_till_mark() calls are nested. This
allows the find_blobs() call-back methods to call py_image.c methods
still and also allows us to add more call-backs in the future without
worry if we need to.

...

Finally, if you have an exception in an interrupt handler all this above
breaks terribly. Given MP already breaks if you try to allocate memory
in an exception this is a "won't fix problem". Don't call code that can
have exceptions or needs memory in an interrupt handler.
2019-03-17 19:20:09 -04:00
Ibrahim Abd Elkader
9581508bb6
Merge pull request #487 from openmv/lepton_fix
Call lepton_reset in recovery code.
2019-03-14 21:01:30 +02:00
iabdalkader
44ee992068 Call lepton_reset in recovery code. 2019-03-14 19:43:59 +02:00
Ibrahim Abd Elkader
39685fb7dc
Merge pull request #486 from openmv/fix_lepton_reset
Fix Lepton reset.
2019-03-13 21:18:17 +02:00
iabdalkader
8aa4205257 Fix Lepton reset. 2019-03-12 22:42:53 +02:00
Ibrahim Abd Elkader
bfca0bb891
Merge pull request #476 from kidswong999/patch-2
fixed class name
2019-03-12 02:34:04 +02:00
Ibrahim Abd Elkader
0932324563
Merge pull request #485 from openmv/add_lepton_examples
Add lepton examples.
2019-03-11 20:28:52 +02:00
Kwabena W. Agyeman
4f0e628bb0 Add lepton examples. 2019-03-11 20:15:48 +02:00
Ibrahim Abd Elkader
1ef73ff858
Merge pull request #484 from openmv/fix_torainbow
Add color palette conversion to to_rainbow()
2019-03-11 20:11:11 +02:00
Kwabena W. Agyeman
a47f4120af Add color palette conversion to to_rainbow() 2019-03-11 19:57:46 +02:00
Ibrahim Abd Elkader
9967400588
Merge pull request #483 from openmv/fix_ioctls
Fix Lepton IOCTLs
2019-03-11 19:54:50 +02:00
Kwabena W. Agyeman
cb1e44abb1 Fix missing break and parens. 2019-03-11 19:41:35 +02:00
Kwabena W. Agyeman
c317226738 Set should return none. 2019-03-11 19:41:26 +02:00
Kwabena W. Agyeman
af289d779f Fixed bugged set/get attribute. 2019-03-11 19:41:17 +02:00
Ibrahim Abd Elkader
1383234122
Merge pull request #482 from openmv/fix_temp
Fix temperature equation.
2019-03-11 19:39:56 +02:00
Kwabena W. Agyeman
960e61aba9 Fix temperature equation. 2019-03-11 19:32:17 +02:00
Ibrahim Abd Elkader
7c5c5cff03
Merge pull request #481 from openmv/add_get_palette
Add method to get the color palette.
2019-03-11 19:21:10 +02:00
Kwabena W. Agyeman
a3f197e12d Add method to get the color palette. 2019-03-11 19:07:13 +02:00
Ibrahim Abd Elkader
e3ebd0d0cd
Merge pull request #480 from openmv/lepton_snapshot_timeout
Add timeout and crash receovery code.
2019-03-11 19:04:56 +02:00
Kwabena W. Agyeman
d4d20a0327 Add timeout and crash receovery code.
The FLIR Lepton 3.5 sometimes doesn't startup. Our previous code just
waited forever. The new code now will timeout but also will try to
recoever the FLIR Lepton 3.5 if possible if the video doesn't start in a
timely manner.
2019-03-11 18:40:16 +02:00
Ibrahim Abd Elkader
1dfd23a901
Merge pull request #479 from openmv/lepton_measurment_mode
Add the ability to set the flir into measurment mode
2019-03-11 18:33:09 +02:00
Kwabena W. Agyeman
92cc75eff5 Add the ability to set the flir into measurment mode
Measurement mode allows you to set a target temperature for the FLIR
lepton so that you can actually use it to measure object temperatures
and do useful things. We try to make the mode work on non-radiometric
FLIR letpons howeever it will not be accurate.
2019-03-11 18:20:31 +02:00
Ibrahim Abd Elkader
70eb903073
Merge pull request #478 from openmv/add_lepton_ioctl
Add Lepton IOCTLs
2019-03-11 18:09:58 +02:00
Kwabena W. Agyeman
860a8b280d Add ioctl to get lepton radiometry. 2019-03-11 17:54:23 +02:00
Kwabena W. Agyeman
76af3bd534 Add ioctl to get the lepton module width and height. 2019-03-11 17:09:49 +02:00
王开智
2a8d54aad7
fixed class name
VL53L0X => VL53L1X
2019-03-11 13:47:22 +08:00
Ibrahim Abd Elkader
7b4b9214cb
Merge pull request #474 from openmv/fix_cascade_converter
Fix cascade converter script Windows bug.
2019-03-07 19:33:39 +02:00
iabdalkader
bb23ed01ad Fix cascade converter script Windows bug.
* Using open "w" instead of "wb" causes the script to fail on Windows.
2019-03-07 19:29:44 +02:00
Ibrahim Abd Elkader
586afe3e2b
Merge pull request #473 from peitschie/master
Avoid invalid mem access by validating post-rounded indices
2019-03-07 18:44:47 +02:00
Philip Peitsch
d734c6c49c Avoid invalid mem access by validating post-rounded indices
These bounds checks were incorrect if sourceX/Y rounds up. In this situation, the unrounded source will be smaller than the limit by a factional amount (C will elevate the int bounds to a float for comparison), but the post-rounded version will equal the limit.

E.g.,
sourceX = 10.5
img->w = 11 (i.e., valid indices are [0-10])
sourceX2 = 11, which is invalid memory
2019-03-06 09:36:52 +11:00
Ibrahim Abd Elkader
8847bcb0fa
Merge pull request #472 from openmv/flir_ioctls
Add FLIR Lepton IOCTLs
2019-03-05 21:21:17 +02:00
iabdalkader
4e0a408055 Add FLIR Lepton IOCTLs 2019-03-05 21:11:52 +02:00
Ibrahim Abd Elkader
edaca4f781
Merge pull request #470 from openmv/set_palette
Add sensor function to change color palettes
2019-03-05 18:45:05 +02:00
iabdalkader
f43e841447 Use sensor color palette in lepton code. 2019-03-05 18:22:11 +02:00
iabdalkader
164f2e71c1 Add set_color_palette 2019-03-05 18:21:53 +02:00