Skip to content

Commit

Permalink
0.0.6 current as -1
Browse files Browse the repository at this point in the history
to indicate non-aware state
  • Loading branch information
HomeACcessoryKid committed Nov 4, 2018
1 parent 50fada9 commit f232935
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main.c
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ homekit_characteristic_t revision = HOMEKIT_CHARACTERISTIC_(FIRMWARE_REVISIO
void target_set(homekit_value_t value);
homekit_characteristic_t target = HOMEKIT_CHARACTERISTIC_(TARGET_POSITION, 0, .setter=target_set);
homekit_characteristic_t state = HOMEKIT_CHARACTERISTIC_(POSITION_STATE, 2);
homekit_characteristic_t current = HOMEKIT_CHARACTERISTIC_(CURRENT_POSITION, 0);
homekit_characteristic_t current = HOMEKIT_CHARACTERISTIC_(CURRENT_POSITION, 0, .min_value=(float[]) {-1});
homekit_characteristic_t obstruction = HOMEKIT_CHARACTERISTIC_(OBSTRUCTION_DETECTED, 0);


Expand Down Expand Up @@ -347,7 +347,7 @@ void parse(int positions) {
if (buff[4]==0x02) { //position answer
xTaskNotifyGive( SendTask );
if (buff[6]==0xff) {
current.value.int_value=22; //no meaningful concept if not aware
current.value.int_value=-1; //no meaningful concept if not aware
aware=0;
if (calibrated) SEND(close); //force a renewed awareness
} else {
Expand Down

0 comments on commit f232935

Please sign in to comment.