mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-06-26 17:26:05 +02:00
Update DOCS.md
This commit is contained in:
@@ -502,7 +502,7 @@ def summary_log(current_gain, clipping, rms_amplitude, thd_percentage):
|
|||||||
if SUMMARY_MODE:
|
if SUMMARY_MODE:
|
||||||
current_time = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())
|
current_time = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())
|
||||||
clipping_status = "Yes" if clipping else "No"
|
clipping_status = "Yes" if clipping else "No"
|
||||||
print(f"[{current_time}] Gain: {current_gain:.1f} dB | Clipping: {clipping_status} | "
|
print(f"[{current_time}] [SUMMARY] Gain: {current_gain:.1f} dB | Clipping: {clipping_status} | "
|
||||||
f"Noise: {rms_amplitude:.5f} | THD: {thd_percentage:.2f}%")
|
f"Noise: {rms_amplitude:.5f} | THD: {thd_percentage:.2f}%")
|
||||||
|
|
||||||
|
|
||||||
@@ -759,7 +759,7 @@ def main():
|
|||||||
|
|
||||||
# Adjust gain based on noise trend if threshold count is reached
|
# Adjust gain based on noise trend if threshold count is reached
|
||||||
if TREND_COUNT >= TREND_COUNT_THRESHOLD:
|
if TREND_COUNT >= TREND_COUNT_THRESHOLD:
|
||||||
if CURRENT_TREND == 1 and int(current_gain_db) >= MAX_GAIN_DB:
|
if CURRENT_TREND == 1 and int(current_gain_db) > MIN_GAIN_DB:
|
||||||
# Decrease gain by DECREASE_GAIN_STEP_DB dB
|
# Decrease gain by DECREASE_GAIN_STEP_DB dB
|
||||||
NEW_GAIN_DB = max(current_gain_db - DECREASE_GAIN_STEP_DB, MIN_GAIN_DB)
|
NEW_GAIN_DB = max(current_gain_db - DECREASE_GAIN_STEP_DB, MIN_GAIN_DB)
|
||||||
if set_gain_db(MICROPHONE_NAME, NEW_GAIN_DB):
|
if set_gain_db(MICROPHONE_NAME, NEW_GAIN_DB):
|
||||||
|
|||||||
Reference in New Issue
Block a user