Skip to content

Commit

Permalink
Fix setHeatModeAsync subtracting 1 from the given body type
Browse files Browse the repository at this point in the history
Fixes #76
  • Loading branch information
parnic committed Jun 15, 2024
1 parent 1c4ab11 commit 517ab1d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## Unreleased

### Fixed

* Fixed bodies.setHeatModeAsync incorrectly subtracting one from the given body index. This is a breaking change if you were correcting for the offset already.

## v2.0.0 - 2023-03-10

This major version number increase comes with many changes under the hood, including a rename of most every method in the library. This adds Promises and Typescript support. See the [Migration guide](https://github.com/parnic/node-screenlogic/wiki/Migration-guide) and [Breaking changes](https://github.com/parnic/node-screenlogic/wiki/Breaking-changes) wiki pages for detailed information.
Expand Down
2 changes: 1 addition & 1 deletion messages/OutgoingMessages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ export class BodyCommands extends Commands {
this.action = HeaterMessage.ResponseIDs.SetHeatMode - 1;
this.createBaseMessage(senderId);
this.writeInt32LE(this.unit.controllerId);
this.writeInt32LE((bodyType - 1) || 0);
this.writeInt32LE(bodyType || 0);
this.writeInt32LE(heatMode || 0);
this.unit.write(this.toBuffer());
return this;
Expand Down

0 comments on commit 517ab1d

Please sign in to comment.