Skip to content

Commit

Permalink
Merge pull request #21 from palisaide/fix-cycledata
Browse files Browse the repository at this point in the history
Remove cycleNumber field from CycleData0 through CycleData4
  • Loading branch information
bakerface authored Oct 31, 2016
2 parents c32a53a + 2b4e0e6 commit 5e8c89d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 80 deletions.
75 changes: 5 additions & 70 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -391,9 +391,8 @@ greenBean.connect("dishwasher", function(dishwasher) {
```

### *dishwasher.cycleData0*
The cycle data is an object with the following fields:
The cycle data is a read-only object with the following fields:
- cycleTime (the time of the cycle)
- cycleNumber (the number of the cycle)
- cycleDurationInMinutes (the duration of the cycle in minutes)
- cycleCompleted (zero if the cycle is not complete, one if incomplete)
- cycleMinimumTemperatureInFahrenheit (the minimum cycle temperature in Fahrenheit)
Expand All @@ -413,25 +412,12 @@ greenBean.connect("dishwasher", function(dishwasher) {
dishwasher.cycleData0.subscribe(function (value) {
console.log("cycle data 0 changed:", value);
});

dishwasher.cycleData0.write({
cycleTime: 5,
cycleNumber: 0,
cycleDurationInMinutes: 25,
cycleCompleted: 0,
cycleMinimumTemperatureInFahrenheit: 60,
cycleMaximumTemperatureInFahrenheit: 80,
cycleFinalCirculationTemperatureInFahrenheit: 70,
cycleMinimumTurbidityInNTU: 0,
cycleMaximumTurbidityInNTU: 0
});
});
```

### *dishwasher.cycleData1*
The cycle data is an object with the following fields:
The cycle data is a read-only object with the following fields:
- cycleTime (the time of the cycle)
- cycleNumber (the number of the cycle)
- cycleDurationInMinutes (the duration of the cycle in minutes)
- cycleCompleted (zero if the cycle is not complete, one if incomplete)
- cycleMinimumTemperatureInFahrenheit (the minimum cycle temperature in Fahrenheit)
Expand All @@ -451,25 +437,12 @@ greenBean.connect("dishwasher", function(dishwasher) {
dishwasher.cycleData1.subscribe(function (value) {
console.log("cycle data 1 changed:", value);
});

dishwasher.cycleData1.write({
cycleTime: 5,
cycleNumber: 0,
cycleDurationInMinutes: 25,
cycleCompleted: 0,
cycleMinimumTemperatureInFahrenheit: 60,
cycleMaximumTemperatureInFahrenheit: 80,
cycleFinalCirculationTemperatureInFahrenheit: 70,
cycleMinimumTurbidityInNTU: 0,
cycleMaximumTurbidityInNTU: 0
});
});
```

### *dishwasher.cycleData2*
The cycle data is an object with the following fields:
The cycle data is a read-only object with the following fields:
- cycleTime (the time of the cycle)
- cycleNumber (the number of the cycle)
- cycleDurationInMinutes (the duration of the cycle in minutes)
- cycleCompleted (zero if the cycle is not complete, one if incomplete)
- cycleMinimumTemperatureInFahrenheit (the minimum cycle temperature in Fahrenheit)
Expand All @@ -489,25 +462,12 @@ greenBean.connect("dishwasher", function(dishwasher) {
dishwasher.cycleData2.subscribe(function (value) {
console.log("cycle data 2 changed:", value);
});

dishwasher.cycleData2.write({
cycleTime: 5,
cycleNumber: 0,
cycleDurationInMinutes: 25,
cycleCompleted: 0,
cycleMinimumTemperatureInFahrenheit: 60,
cycleMaximumTemperatureInFahrenheit: 80,
cycleFinalCirculationTemperatureInFahrenheit: 70,
cycleMinimumTurbidityInNTU: 0,
cycleMaximumTurbidityInNTU: 0
});
});
```

### *dishwasher.cycleData3*
The cycle data is an object with the following fields:
The cycle data is a read-only object with the following fields:
- cycleTime (the time of the cycle)
- cycleNumber (the number of the cycle)
- cycleDurationInMinutes (the duration of the cycle in minutes)
- cycleCompleted (zero if the cycle is not complete, one if incomplete)
- cycleMinimumTemperatureInFahrenheit (the minimum cycle temperature in Fahrenheit)
Expand All @@ -527,25 +487,12 @@ greenBean.connect("dishwasher", function(dishwasher) {
dishwasher.cycleData3.subscribe(function (value) {
console.log("cycle data 3 changed:", value);
});

dishwasher.cycleData3.write({
cycleTime: 5,
cycleNumber: 0,
cycleDurationInMinutes: 25,
cycleCompleted: 0,
cycleMinimumTemperatureInFahrenheit: 60,
cycleMaximumTemperatureInFahrenheit: 80,
cycleFinalCirculationTemperatureInFahrenheit: 70,
cycleMinimumTurbidityInNTU: 0,
cycleMaximumTurbidityInNTU: 0
});
});
```

### *dishwasher.cycleData4*
The cycle data is an object with the following fields:
The cycle data is a read-only object with the following fields:
- cycleTime (the time of the cycle)
- cycleNumber (the number of the cycle)
- cycleDurationInMinutes (the duration of the cycle in minutes)
- cycleCompleted (zero if the cycle is not complete, one if incomplete)
- cycleMinimumTemperatureInFahrenheit (the minimum cycle temperature in Fahrenheit)
Expand All @@ -565,18 +512,6 @@ greenBean.connect("dishwasher", function(dishwasher) {
dishwasher.cycleData4.subscribe(function (value) {
console.log("cycle data 4 changed:", value);
});

dishwasher.cycleData4.write({
cycleTime: 5,
cycleNumber: 0,
cycleDurationInMinutes: 25,
cycleCompleted: 0,
cycleMinimumTemperatureInFahrenheit: 60,
cycleMaximumTemperatureInFahrenheit: 80,
cycleFinalCirculationTemperatureInFahrenheit: 70,
cycleMinimumTurbidityInNTU: 0,
cycleMaximumTurbidityInNTU: 0
});
});
```

Expand Down
15 changes: 5 additions & 10 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,7 @@ function DishWasher (bus, appliance, base) {
endian: "big",
format: [
"cycleTime:UInt32",
"cycleNumber:UInt8",
"cycleDurationInMinutes:UInt8",
"cycleDurationInMinutes:UInt16",
"cycleCompleted:UInt8",
"cycleMinimumTemperatureInFahrenheit:UInt8",
"cycleMaximumTemperatureInFahrenheit:UInt8",
Expand All @@ -153,8 +152,7 @@ function DishWasher (bus, appliance, base) {
endian: "big",
format: [
"cycleTime:UInt32",
"cycleNumber:UInt8",
"cycleDurationInMinutes:UInt8",
"cycleDurationInMinutes:UInt16",
"cycleCompleted:UInt8",
"cycleMinimumTemperatureInFahrenheit:UInt8",
"cycleMaximumTemperatureInFahrenheit:UInt8",
Expand All @@ -169,8 +167,7 @@ function DishWasher (bus, appliance, base) {
endian: "big",
format: [
"cycleTime:UInt32",
"cycleNumber:UInt8",
"cycleDurationInMinutes:UInt8",
"cycleDurationInMinutes:UInt16",
"cycleCompleted:UInt8",
"cycleMinimumTemperatureInFahrenheit:UInt8",
"cycleMaximumTemperatureInFahrenheit:UInt8",
Expand All @@ -185,8 +182,7 @@ function DishWasher (bus, appliance, base) {
endian: "big",
format: [
"cycleTime:UInt32",
"cycleNumber:UInt8",
"cycleDurationInMinutes:UInt8",
"cycleDurationInMinutes:UInt16",
"cycleCompleted:UInt8",
"cycleMinimumTemperatureInFahrenheit:UInt8",
"cycleMaximumTemperatureInFahrenheit:UInt8",
Expand All @@ -201,8 +197,7 @@ function DishWasher (bus, appliance, base) {
endian: "big",
format: [
"cycleTime:UInt32",
"cycleNumber:UInt8",
"cycleDurationInMinutes:UInt8",
"cycleDurationInMinutes:UInt16",
"cycleCompleted:UInt8",
"cycleMinimumTemperatureInFahrenheit:UInt8",
"cycleMaximumTemperatureInFahrenheit:UInt8",
Expand Down

0 comments on commit 5e8c89d

Please sign in to comment.