-
Notifications
You must be signed in to change notification settings - Fork 180
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I 888 mean auto #997
I 888 mean auto #997
Conversation
AndreasLMeg
commented
Feb 3, 2022
- Mode mean: now supports AutoGain (on/off), AutoExposure (on/off) and different values for day and night
- The mean value can also be defined differently for day and night.
* Mode mean: now supports AutoGain (on/off), AutoExposure (on/off) and different values for day and night * The mean value can also be defined differently for day and night.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@andreaous. Do you want me to approve this PR?
@EricClaeys @linuxkidd - I would be very grateful if you could do a review, test and approve |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AndreasLMeg
In config.sh.repo, can you add "-daymean 0.3" to line 69?
capture_RPiHQ.cpp:
Lines 1067 and 1073 set myModeMeanSetting.mode_mean = true. What if the user has -nightmean set but not -daymean (or vice versa?) Where is myModeMeanSetting.mode_mean set to false? Possibly lines 1067 and 1073 should be deleted and myModeMeanSetting.mode_mean set to true or false where the "current" variables are set, like "currentAutoExposure = asiDayAutoExposure;"?
Minor: on lines 1344 and 1347 in capture_RPiHQ.cpp, "Set" should be "Sets". On line 1347, delete "-day".
Lines 1537-1541. Can these only be displayed if either day or night mean (or both) is set? I've been trying to not add log entries for things that don't apply, for example, on ZWO I don't display the cooling temperature for cameras that don't support cooling, since it doesn't apply.
mode_RPiHQ_mean.h:
Line 5: "-mean-value-day" should be "-daymean" ?
Line 16: "exposureis" should be "exposure is".
Line 28: Should there be a default "dayMean" ?
mode_RPiHQ_mean.cpp:
Line 2: "-mean-value-day" should be "-daymean" ?
Line 278 casts exposure_us and US_IN_SEC to "(double)" but line 270 doesn't. Does that matter?
Line 273 used "(double)" but line 281 doesn't.
@AndreasLMeg, @linuxkidd, |
@EricClaeys Thank you very much for the review ! With the next commit:
|
sorry make such a mess - but you can use "Squash" to merge this PR |
@AndreasLMeg Can you walk me through what happens if someone only wants to use the meanmode at night or during the day? Will the code handle that? What variable(s) would they set? |
@AndreasLMeg If modemean is set, how is that different from auto exposure? I assume we are allowing auto exposure without modemean, and modemean without auto exposure? If true, we'll need to document what the differences are. |
@EricClaeys I hope this will explain I didn't do or adjust the old behavior. |
@AndreasLMeg I am testing this code now and will let it go overnight and tomorrow during the day. |
Oh yes, copy paste mistake, sorry. |
Hi @AndreasLMeg In cases where either day or night ModeMean is on but not both, where in the code is it turning it on and off? |
@AndreasLMeg I believe the "==" on line 446 in capture_RPiHQ.cpp should be "!=". If we're doing any ModeMean'ing we want a short --timeout. The way it is now, we only get the short timeout if mean_auto is off. |
Hello Eric,
if some mean paramameters are defined Mode mean is activ. Depending on AUTO values the MEAN_AUTO_MODE is set.
https://github.com/AndreasLMeg/allsky/blob/1d01cf30260c37fe13441b2e09f17b6c8a80ff13/src/capture_RPiHQ.cpp#L1636
typedef enum {
MEAN_AUTO_OFF = 0, // defined exposure and gain is used
MEAN_AUTO, // changes exposure between 1us and defined exposure, and gain between 1 and defined gain
MEAN_AUTO_EXPOSURE_ONLY, // changes exposure between 1us and defined exposure, and defined gain is used
MEAN_AUTO_GAIN_ONLY // changes gain between 1 and defined gain, and defined exposure is used
} MEAN_AUTO_MODE;
// check and set mean_auto
if (autoGain && autoExposure)
currentModeMeanSetting.mean_auto = MEAN_AUTO;
else if (autoGain)
currentModeMeanSetting.mean_auto = MEAN_AUTO_GAIN_ONLY;
else if (autoExposure)
currentModeMeanSetting.mean_auto = MEAN_AUTO_EXPOSURE_ONLY;
else
currentModeMeanSetting.mean_auto = MEAN_AUTO_OFF;
|
I have to check this - it's so far away.... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AndreasLMeg We can add the maxexposure values in a separate PR. We'll also need to update the settings_RPiHQ.json and camera_options_RPiHQ.json in allsky-portal to include the options, then remove the comment about -daymean and -nightmean from config.sh.