Commit Graph

1762 Commits

Author SHA1 Message Date
iabdalkader
4ab1c15bac Bump firmware version. 2019-04-30 17:57:01 +02:00
Dech
9ce737c5cf include frozen_mpy.o when compiling a frozen module. 2019-04-30 04:44:02 +07:00
Kwabena W. Agyeman
65150a5dda Fixed missing parens 2019-04-28 21:21:10 -04:00
Dech
c06a57610e fixed missing break statement in py_net_search. 2019-04-28 12:29:34 +07:00
iabdalkader
6686f4f108 OMV2 FFS fixes.
* Enable exFAT for OpenMV2
* Allow smaller filesystems to be created.
* Fixes issue #514
2019-04-26 23:20:29 +02:00
iabdalkader
7c1389ed1b Update H7 clocks.
* Set default SD clock to 48MHz.
* Set some clock sources defaults.
2019-04-22 23:26:35 +02:00
iabdalkader
d47c039b8f Add string0 to bootloader sources.
* Required to init structs to zero.
2019-04-22 23:01:41 +02:00
iabdalkader
ab94cb14fd Set H7 frequency to 480MHz.
* According to ST, the H7 can actually run at 480MHz.
2019-04-22 00:46:39 +02:00
Ibrahim Abd Elkader
3ee5bd61a2
Merge pull request #510 from openmv/h7_sd
Fix H7 SD clock.
2019-04-22 00:10:48 +02:00
iabdalkader
cc95af7f34 Fix H7 SD clock. 2019-04-22 00:02:43 +02:00
iabdalkader
3d722bc35d Move SCCB timing to board config files. 2019-04-21 01:17:03 +02:00
iabdalkader
4ed92bf227 Fix SCCB/I2C timing for F7 & H7. 2019-04-21 00:52:35 +02:00
iabdalkader
29468b1d13 Enable framebuf module 2019-04-17 22:28:20 +02:00
iabdalkader
67bcebeedc WINC: Set ioctl function.
* MP code doesn't check for NULL ioctl.
2019-04-15 23:45:40 +02:00
iabdalkader
e9579d25c5 Allow ctrl-C to work with UARTs put on REPL.
* Fix from MP upstream.
2019-04-11 18:56:47 +02:00
iabdalkader
ae9efb6cc4 Update micropython docs. 2019-04-01 15:02:18 +02:00
iabdalkader
aefa80732d Use nonsquare NN functions. 2019-04-01 00:20:05 +02:00
iabdalkader
bf5db7cd3f Bump firmware version. 2019-03-30 15:44:38 +02:00
iabdalkader
367383d800 Fix H7 JPEG encoder boundaries. 2019-03-22 22:47:55 +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
75a028f9e9 Remove extra fb_free calls. 2019-03-18 17:37:18 +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
iabdalkader
44ee992068 Call lepton_reset in recovery code. 2019-03-14 19:43:59 +02:00
iabdalkader
8aa4205257 Fix Lepton reset. 2019-03-12 22:42:53 +02:00
Kwabena W. Agyeman
a47f4120af Add color palette conversion to to_rainbow() 2019-03-11 19:57:46 +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
Kwabena W. Agyeman
960e61aba9 Fix temperature equation. 2019-03-11 19:32:17 +02:00
Kwabena W. Agyeman
a3f197e12d Add method to get the color palette. 2019-03-11 19:07:13 +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
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
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
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
iabdalkader
4e0a408055 Add FLIR Lepton IOCTLs 2019-03-05 21:11:52 +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
iabdalkader
e4ead239be Add ironbow table. 2019-03-05 16:56:52 +02:00
iabdalkader
ef7ef4a390 Remove FFC check.
* Some sensors fail this check.
2019-03-05 15:42:35 +02:00
iabdalkader
4c15ce66ca Check pixel format. 2019-03-05 15:38:40 +02:00
iabdalkader
54e431adb2 Implement MT triggered mode using ioctls 2019-03-04 20:55:17 +02:00
iabdalkader
aafc6e995a Add sensor ioctl function. 2019-03-04 19:52:11 +02:00
Ibrahim Abd Elkader
2e327aaf38
Merge pull request #465 from kwagyeman/kwabena/mt_driver_update
Kwabena/mt driver update
2019-03-04 18:44:12 +02:00
Kwabena W. Agyeman
599357a719 Make WVGA2 and WVGA work. 2019-03-03 21:59:40 -05:00
Kwabena W. Agyeman
2a62bde28b Allow making auto exposure very long or very short. 2019-03-03 21:23:47 -05:00
Kwabena W. Agyeman
9e8deb6928 Cleanup the MT9V034 driver.
* Removed pointless code and static vars.
* FIxed bugs invloving shadow registers.
2019-03-03 03:41:50 -05:00
Kwabena W. Agyeman
f0ce9d9530 Force shadow mode register updates. 2019-03-03 01:00:25 -05:00
Kwabena W. Agyeman
1269aa1bbc Add default state for static var. 2019-03-03 00:48:34 -05:00
Kwabena W. Agyeman
3c49f986e4 Enable setting the sensor to a triggered mode. 2019-03-03 00:48:12 -05:00
Kwabena W. Agyeman
2523754638 Make default jpeg res not so terrible. 2019-03-02 22:34:32 -05:00
Ibrahim Abd Elkader
3dcd029160
Merge pull request #462 from openmv/fix_mt_set_framesize
Fix MT set_framesize.
2019-03-01 21:45:55 +02:00
Ibrahim Abd Elkader
d4afc610a3
Merge pull request #461 from openmv/check_framesize
Check return value from set_framesize.
2019-03-01 21:25:42 +02:00
iabdalkader
02c94ec54d Fix MT set_framesize.
* Fix exception if the order of functions call is swapped (set_framesize before set_pixformat)
* The order of functions shouldn't matter, if necessary this check should be done in snapshot.
* This fixes issue #444
2019-03-01 21:19:46 +02:00
iabdalkader
b0442633ef Check return value from set_framesize. 2019-03-01 21:17:58 +02:00
iabdalkader
8797e72db7 Force 32-bit enums in Lepton code.
* Fix bug introduced by linking libgcc making enums variable size which breaks Lepton code.
2019-02-25 22:09:54 +02:00
iabdalkader
1acabbebb3 Apply ff13c patches. 2019-02-24 19:59:22 +02:00
iabdalkader
530dee933f Fix H7 ADC bug.
* Fix issue #453
* Use ADC handle to read the used ADC instance.
2019-02-21 17:29:21 +02:00
Kwabena W. Agyeman
b230de3b42 Add binary format to sensor.
* This format is for use in the Image Lib module since sensor is where
we put the image types.

Will work on the lepton and global shutter drivers next.
2019-02-20 01:59:47 -05:00
Kwabena W. Agyeman
b2bcbf09d4 Fix typo. 2019-02-20 00:42:28 -05:00
Kwabena W. Agyeman
cd586f66bc Upgrade text drawing to support rotations of the character and string. 2019-02-16 21:19:05 -05:00
Kwabena W. Agyeman
ae9f1833f8 Fix rotation issues. 2019-02-16 21:19:05 -05:00
Kwabena W. Agyeman
5b3cd7c9db Make rotation not an optional argument for ellipses. 2019-02-16 21:19:05 -05:00
Kwabena W. Agyeman
ca94ffec42 Avoid using roundf
While this shouldn't happen the method seems to sometimes round up past
limits. For example, 1 * 2.0 could be 3 because the 2.0 might be like
2.0000000000001.

So, avoid using roundf. There are other methods this needs to be
switched out on. But, will do these ones for now.

Note that not all roundf values must be removed... just areas where
there's a clear limit on the max value returned from roundf.
2019-02-16 21:19:05 -05:00
Kwabena W. Agyeman
954431ef52 Add mask functionality to clear. 2019-02-16 21:19:05 -05:00
Kwabena W. Agyeman
1f72c3750d Add back mask methods. 2019-02-16 21:19:05 -05:00
iabdalkader
766688f72a Enable exFAT support. 2019-02-14 00:06:11 +02:00
iabdalkader
512fa46b04 Update FatFS to FF13C 2019-02-13 23:38:11 +02:00
iabdalkader
7833adc882 Link with libgcc for AEABI functions. 2019-02-13 23:14:55 +02:00
iabdalkader
6f7187526a Fix keypoint op. 2019-02-13 23:09:47 +02:00
Kaizhi Wong
7e966d187f remove rst pin 2019-02-12 15:58:40 +08:00
Kwabena W. Agyeman
f615b0a607 Fix bugs in copy(). 2019-02-06 02:15:39 -05:00
Kwabena W. Agyeman
1259bcaa71 Make to_x() methods smarter about the frame buffer. 2019-02-06 02:15:39 -05:00
Kwabena W. Agyeman
31b03f5447 Cleanup color methods. 2019-02-04 12:37:25 -05:00
Ibrahim Abd Elkader
cb959a7347
Merge pull request #440 from kwagyeman/kwabena/upgrade_copy_ops
Upgrade copy ops
2019-02-04 00:33:52 +02:00
Kwabena W. Agyeman
a3cc10bf72 Fixed thermal image rotation issues 2019-02-03 00:13:54 -05:00
Kwabena W. Agyeman
fff1964d9b Upgrade copy_to_fb for fir. 2019-02-02 23:21:05 -05:00
Kwabena W. Agyeman
bb9b78f4fe Improve copy_to_fb for load_image. 2019-02-02 23:21:05 -05:00
Kwabena W. Agyeman
f9e6b3fe01 Remove unsupported types. 2019-02-02 23:21:05 -05:00
Kwabena W. Agyeman
b8df7033ab Improve Image() so you can now create null images. 2019-02-02 23:21:05 -05:00
Kwabena W. Agyeman
6ca963a7eb Fix in-place cap. 2019-02-02 23:21:05 -05:00
Kwabena W. Agyeman
67686c5f1b Update old image handles during in-place actions. 2019-02-02 23:21:05 -05:00
iabdalkader
f01e451bb4 Use fb_alloc_mark to avoid dealloc'ing the extra FB. 2019-01-31 21:51:17 +02:00
iabdalkader
7604983fca Use stdint in color conversion functions. 2019-01-30 00:27:40 +02:00
Kwabena W. Agyeman
6d59e59321 Upgrade copy()
* Copy is really good now.
* Added crop/scale which are variants of copy.
2019-01-28 00:13:17 -05:00
Kwabena W. Agyeman
446cc14562 Fix in-place def. 2019-01-27 20:31:39 -05:00
Kwabena W. Agyeman
1518e678ba Fix wrong size calculation. 2019-01-27 19:57:52 -05:00
Kwabena W. Agyeman
27fceecc05 Fix wrong bit depth. 2019-01-27 19:42:15 -05:00
Kwabena W. Agyeman
cbc31da2ec Fix bitmap jpeg compression on H7. 2019-01-27 19:41:05 -05:00
Kwabena W. Agyeman
7f929f5ca6 Add color channel extraction per forum users request. 2019-01-27 19:25:21 -05:00
Kwabena W. Agyeman
ce7699c6b9 Update qstrs. 2019-01-27 18:41:30 -05:00
Kwabena W. Agyeman
949f738073 Modernize pooling methods. 2019-01-27 18:38:50 -05:00
iabdalkader
4ba9a08bd2 Enable py_tv module. 2019-01-27 23:22:38 +02:00
Kwabena W. Agyeman
7730cd8107 Re-enable some rather useful methods for OpenMV2. 2019-01-27 22:59:12 +02:00
Kwabena W. Agyeman
14f4c53037 Make Color LUTs configurable in imlib_config. 2019-01-27 22:52:48 +02:00
Kwabena W. Agyeman
9edded29da Export color conversion functions to Python. 2019-01-27 22:42:38 +02:00
Kwabena W. Agyeman
3a8ac88f66 Update blob code and examples. 2019-01-27 00:46:15 +02:00
iabdalkader
c54b5d2b76 Disable exFAT.
* The old FatFs R0.12b exFAT implementation is buggy, will disable exFAT until it gets updated.
2019-01-26 20:24:56 +02:00