Skip to content

Commit

Permalink
Merge pull request #341 from Craytor/master
Browse files Browse the repository at this point in the history
PTZ Presets Object token fix
  • Loading branch information
agsh authored Oct 27, 2024
2 parents 202325a + 54f08ae commit 4a8ec35
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/ptz.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ module.exports = function(Cam) {
presets = [presets];
}
presets.forEach(function(preset) {
this.presets[preset.name] = preset.$.token;
this.presets[preset.$.token] = preset.name;
}.bind(this));
}
}
Expand Down
7 changes: 7 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
"keypress": "^0.2.1",
"mocha": "^10.0.0",
"nimble": "^0.0.2",
"nyc": "^15.1.0"
"nyc": "^15.1.0",
"ip": "^2.0.1"
}
}
3 changes: 3 additions & 0 deletions test/serverMockup/ptz.GetPresets.xml
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,9 @@
<tptz:Preset token="Home">
<tt:Name>Home</tt:Name>
</tptz:Preset>
<tptz:Preset token="Home2">
<tt:Name>Home</tt:Name>
</tptz:Preset>
{{?}}
</tptz:GetPresetsResponse>
</SOAP-ENV:Body>
Expand Down

0 comments on commit 4a8ec35

Please sign in to comment.