Skip to content

Commit

Permalink
Update allsky_common.cpp: Only output AWB values for color cameras
Browse files Browse the repository at this point in the history
  • Loading branch information
EricClaeys authored Jul 20, 2024
1 parent 1a68c0c commit 8e5b490
Showing 1 changed file with 16 additions and 14 deletions.
30 changes: 16 additions & 14 deletions src/allsky_common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -236,22 +236,24 @@ void add_variables_to_command(config cg, char *cmd, timeval startDateTime)
strcat(cmd, tmp);
}

snprintf(tmp, s, " AUTOWB=%d", cg.currentAutoAWB ? 1 : 0);
strcat(cmd, tmp);
snprintf(tmp, s, " sAUTOAWB='%s'", cg.currentAutoAWB ? "(auto)" : "");
strcat(cmd, tmp);
if (cg.lastWBR >= 0.0) {
snprintf(tmp, s, " WBR=%s", LorF(cg.lastWBR, "%d", "%f"));
strcat(cmd, tmp);
}
if (cg.lastWBB >= 0.0) {
snprintf(tmp, s, " WBB=%s", LorF(cg.lastWBB, "%d", "%f"));
if (cg.isColorCamera)
{
snprintf(tmp, s, " AUTOWB=%d", cg.currentAutoAWB ? 1 : 0);
strcat(cmd, tmp);
}

if (cg.lastMean >= 0.0) {
snprintf(tmp, s, " MEAN=%f", cg.lastMean);
snprintf(tmp, s, " sAUTOAWB='%s'", cg.currentAutoAWB ? "(auto)" : "");
strcat(cmd, tmp);
if (cg.lastWBR >= 0.0) {
snprintf(tmp, s, " WBR=%s", LorF(cg.lastWBR, "%d", "%f"));
strcat(cmd, tmp);
}
if (cg.lastWBB >= 0.0) {
snprintf(tmp, s, " WBB=%s", LorF(cg.lastWBB, "%d", "%f"));
strcat(cmd, tmp);
}
if (cg.lastMean >= 0.0) {
snprintf(tmp, s, " MEAN=%f", cg.lastMean);
strcat(cmd, tmp);
}
}

// Since negative temperatures are valid, check against an impossible temperature.
Expand Down

0 comments on commit 8e5b490

Please sign in to comment.