Skip to content
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

Update install.sh: call check_new_exposure_algorithm() #2766

Merged
merged 1 commit into from
Jun 10, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2087,6 +2087,31 @@ check_restored_settings()
}


####
# See if the new ZWO exposure algorithm should be used.
check_new_exposure_algorithm()
{
local FIELD="experimentalExposure"
local NEW="$( settings ".${FIELD}" )"
[[ ${NEW} -eq 1 ]] && return

MSG="There is a new auto-exposure algorithm for nighttime images that initial testing indicates"
MSG="${MSG} it creates better images at night and during the day-to-night transition."
MSG="${MSG}\n\nDo you want to use it?"
if whiptail --title "${TITLE}" --yesno "${MSG}" 10 "${WT_WIDTH}" 3>&1 1>&2 2>&3; then
display_msg --logonly info "Enabling ${FIELD}."
update_json_file ".${FIELD}" 1 "${SETTINGS_FILE}"

MSG="Please provide feedback on the new auto-exposure algorithm"
MSG="${MSG} by entering a Discussion item in GitHub."
MSG="${MSG}\nYou can disable it by changing 'New Exposure Algorithm' in the WebUI."
display_msg notice "${MSG}"
else
display_msg --logonly info "User elected NOT to use ${FIELD}."
fi
}


####
remind_old_version()
{
Expand Down Expand Up @@ -2319,6 +2344,10 @@ ask_reboot "full" # prompts
##### Display any necessary messaged about restored / not restored settings
check_restored_settings

##### If using ZWO, prompt if the New Exposure Algorithm should be used.
# TODO: remove check_new_exposure_algorithm() when it's the default.
[[ ${CAMERA_TYPE} == "ZWO" ]] && check_new_exposure_algorithm

##### Let the user know to run check_allsky.sh.
remind_run_check_allsky

Expand Down