aboutsummaryrefslogtreecommitdiffstats
path: root/4a-hal
diff options
context:
space:
mode:
authorJonathan Aillet <jonathan.aillet@iot.bzh>2019-04-18 16:42:08 +0200
committerJonathan Aillet <jonathan.aillet@iot.bzh>2019-04-19 11:11:52 +0200
commit4ea92b056bc6932b8eae57b53181e33dce2c2337 (patch)
tree9e56dd66eb8c9815d5940d3bd68bd2df20204b00 /4a-hal
parent0c6d3da287a0f0d4e8a301f5464a94660d704e41 (diff)
Rename misnamed var in values changing function
Rename misnamed variable in function used to change ALSA values using percentage. BUG-AGL: SPEC-2329 Change-Id: I7ba630f591d0d1af0c7f021002493a80817b27a1 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
Diffstat (limited to '4a-hal')
-rw-r--r--4a-hal/4a-hal-controllers/4a-hal-controllers-value-handler.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/4a-hal/4a-hal-controllers/4a-hal-controllers-value-handler.c b/4a-hal/4a-hal-controllers/4a-hal-controllers-value-handler.c
index 74d0fdd..4e9b56d 100644
--- a/4a-hal/4a-hal-controllers/4a-hal-controllers-value-handler.c
+++ b/4a-hal/4a-hal-controllers/4a-hal-controllers-value-handler.c
@@ -272,7 +272,7 @@ int HalCtlsChangePreviousValuesUsingJson(afb_api_t apiHandle,
json_object *previousControlValuesJ,
json_object **ChangedJ)
{
- int requestedPercentageVariation, requestedeVariation, toChangeValue, changedValue, idx, count;
+ int requestedPercentageVariation, requestedVariation, toChangeValue, changedValue, idx, count;
char *requestedPercentageVariationString, *conversionEnd;
@@ -307,11 +307,11 @@ int HalCtlsChangePreviousValuesUsingJson(afb_api_t apiHandle,
return -3;
}
- requestedeVariation = HalCtlsConvertPercentageToValue((int) abs(requestedPercentageVariation),
- alsaCtlProperties->minval,
- alsaCtlProperties->maxval);
+ requestedVariation = HalCtlsConvertPercentageToValue((int) abs(requestedPercentageVariation),
+ alsaCtlProperties->minval,
+ alsaCtlProperties->maxval);
- if(requestedeVariation == -INT_MAX) {
+ if(requestedVariation == -INT_MAX) {
AFB_API_ERROR(apiHandle,
"Didn't succeed to convert %i (using min %i et max %i)",
requestedPercentageVariation,
@@ -321,7 +321,7 @@ int HalCtlsChangePreviousValuesUsingJson(afb_api_t apiHandle,
}
if(requestedPercentageVariation < 0)
- requestedeVariation = -requestedeVariation;
+ requestedVariation = -requestedVariation;
count = (int) json_object_array_length(previousControlValuesJ);
@@ -339,12 +339,12 @@ int HalCtlsChangePreviousValuesUsingJson(afb_api_t apiHandle,
toChangeValue = json_object_get_int(toChangeObjectJ);
- if((toChangeValue + requestedeVariation) < alsaCtlProperties->minval)
+ if((toChangeValue + requestedVariation) < alsaCtlProperties->minval)
changedValue = alsaCtlProperties->minval;
- else if((toChangeValue + requestedeVariation) > alsaCtlProperties->maxval)
+ else if((toChangeValue + requestedVariation) > alsaCtlProperties->maxval)
changedValue = alsaCtlProperties->maxval;
else
- changedValue = toChangeValue + requestedeVariation;
+ changedValue = toChangeValue + requestedVariation;
json_object_array_put_idx(changedArrayJ, idx, json_object_new_int(changedValue));
}