Merge pull request #7406 from to-scho/hotfix/shutter_pos_to_percentage_fix

Wrong shutter percentage reporting
This commit is contained in:
Theo Arends 2020-01-02 14:39:19 +01:00 committed by GitHub
commit 7ca423da92
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -132,7 +132,7 @@ uint8_t ShutterRealToPercentPosition(int32_t realpos, uint8_t index)
uint16_t realpercent;
for (uint8_t i=0 ; i < 5 ; i++) {
if (realpos > Shutter.open_max[index] * calibrate_pos[i+1] / 100) {
if (realpos >= Shutter.open_max[index] * calibrate_pos[i+1] / 100) {
realpercent = Settings.shuttercoeff[i][index] /10;
//AddLog_P2(LOG_LEVEL_INFO, PSTR("Realpercent TEMP1: %d, %% %d, coeff %d"), realpercent, realpos, Shutter_Open_Max[index] * calibrate_pos[i+1] / 100);
} else {