Commit Graph

87 Commits

Author SHA1 Message Date
Kwabena W. Agyeman
02af722fe8 Fixed fb_alloc() with mark for recently re-worked code.
I also tested the firmware for about an hour to make sure there was no
stack leak.

Note that I prefer for fb_free() to still be called versus
fb_free_till_mark() doing that for you in the code.

For functions without this fix they will just free the entire fb_alloc
stack when an exception happens. For functions with this fix they will
only free up to and including the mark. Since there are no places in the
firmware where you could start building a second fb_alloc stack when one
is already in place this point is moot currently. But, if we do
something like that in the future the problem will have already been
solved.

Any new code or re-worked code should use the mark function.
2017-01-18 18:39:08 -05:00
Kwabena W. Agyeman
0e89b655bf Made set_windowing simpilier.
Tested with updated qr code example script.
2017-01-12 17:41:40 -05:00
iabdalkader
1b22a29612 Add set_gain/exposure/whitebalance functions.
* Add functions to disable auto functions control and set manual values.
2016-12-29 03:39:06 +02:00
iabdalkader
fd384bf1b0 Export OV7725's lens shading correction function. 2016-12-25 02:45:05 +02:00
iabdalkader
b655a54885 Remove frame size assertion in snapshot()
* Frame gets automatically cropped if it's bigger than the max raw frame.
2016-08-18 00:26:01 +02:00
iabdalkader
1cbcb7e434 Add M7 support 2016-08-12 22:43:50 +02:00
iabdalkader
02088a14e1 Rename set_binning to set_windowing. 2016-06-20 22:24:00 +02:00
iabdalkader
968bfde8f2 Add new smaller resolutions.
* Add 40x30, 64x32 and 64x64
2016-06-19 21:27:09 +02:00
iabdalkader
440c9dc8bc Implement binning. 2016-06-03 23:01:28 +02:00
iabdalkader
2e2c563227 Re-implement line filters with Python callbacks. 2016-05-16 14:22:30 +02:00
Kwabena W. Agyeman
80cb701d3b Add missing cam functionality
Added the ability to turn AGC off. Kinda will need the ability to restore
AGC settings back to user specified ones in the future... but, this will
do for now.

Added the ability to turn AEC off. Objectively this function probably
won't be used. But, in low light situations it can help.

Added get_fb() to allow you to get the last image snapshot returned.

There was some old exposure function in the code that was getting
optimized out. So, I deleted the used methods that didn't have any code
in them and commented out the only method that did.
2016-04-27 21:53:06 -04:00
Kwabena W. Agyeman
bc687ebf59 We seem to be doing this alot in the code.
So I'm just adding a function to do it cleanly and efficently. Call
skip_frames() after changing any camera settings to let it settle.

10 frames by default works fine. Tested it.
2016-03-28 22:59:59 -04:00
Kwabena W. Agyeman
2fa8227c7b Add AWB/HMirror/VFlip
Added setters for these camera settings. AWB is necessary for color
tracking to work correctly. AGC still runs, which causes lighting
shifts. It may need to be disabled too. Not sure... if I want to do that
or not however, because without it lightning won't get normalized to
remain at a certain level. So, turning AGC off may cause issues in other
ways.
2016-03-25 16:36:10 -04:00
iabdalkader
d1e782df3d Remove default sensor config.
* Not really needed.
2016-03-06 19:01:10 +02:00
iabdalkader
a4ea3e0e20 Add filter functions
* Filter functions bypass the default line processing in sensor.c, and pre-process lines.
* Processing is done on the fly, i.e. filters are called from after each line is received.
2016-02-20 03:58:40 +02:00
iabdalkader
d3d7e5dc39 Use typdef's for sensor enum and structs. 2016-02-17 19:46:45 +02:00
iabdalkader
f8bfbfabe9 Add sensor.get_id function to return PID. 2016-02-10 19:00:05 +02:00
iabdalkader
d4b13d21ce Add support for special effects. 2016-02-09 02:08:07 +02:00
iabdalkader
69cd07e923 Add sanity checks and meaningful error messages. 2016-02-07 02:34:47 +02:00
iabdalkader
07e0385bf0 Add HQVGA resolution. 2016-02-07 02:32:16 +02:00
iabdalkader
e0c5822c28 Raise exception if pixel format is not supported. 2016-02-05 02:15:22 +02:00
iabdalkader
5203fd8434 Pass slave address to SCCB_Read/Write
* Add slave address to sensor struct.
* Pass slave address to every SCCB_Read/Write function.
* Pass a pointer to the sensor struct to sensor functions.
2016-01-28 14:09:12 +02:00
iabdalkader
e3f41d674e Add sensor_snapshot timeout 2015-09-22 01:34:21 +02:00
iabdalkader
86a141e51a Add set color bar function 2015-07-29 22:32:05 +02:00
iabdalkader
f34b07f015 Update print function 2015-07-18 07:05:13 +02:00
iabdalkader
d38112fb3c Add set_saturation function 2015-05-05 14:02:44 +03:00
iabdalkader
54ae5ff425 Add new resolution for LCD 2015-05-05 13:39:16 +03:00
iabdalkader
ace7b976fb Remove init_modules
* init modules is not needed anymore.
2015-05-03 10:22:07 +03:00
iabdalkader
e4003e3e96 Enable UXGA 2014-10-06 17:37:51 +02:00
iabdalkader
65cd8a133a Update license
* Switch to MIT
* Add license notice to source files
2014-09-20 05:09:52 +02:00
iabdalkader
0aeab28640 Update MP Modules
* Update all modules for new API
* Move modules to built-in
2014-08-26 20:32:43 +02:00
iabdalkader
78ad46dd34 Add set_quality for JPEG mode 2014-07-09 04:31:39 +02:00
iabdalkader
5470b6c72f Add new constants 2014-06-25 19:50:30 +02:00
iabdalkader
64b883ceaf Update sensor drivers
* Add set_contrast
* Fix set_brightness
2014-06-19 23:19:11 +02:00
iabdalkader
c1dab26fca Fix more sources to use HAL 2014-06-18 21:20:22 +02:00
iabdalkader
1e4b6fa8fd Update sources to new HAL 2014-06-18 17:28:46 +02:00
iabdalkader
4df970b418 Move files to OMV 2014-06-14 12:28:45 +02:00