Skip to content

Commit

Permalink
Fix ProxyExt to convert API value to BStatusBoolean for bool points
Browse files Browse the repository at this point in the history
  • Loading branch information
afrankvt committed Jun 16, 2021
1 parent 420f63a commit 8a20ce4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Changelog

## Version 0.2 (working)
* Fix JSON parsing of numbers using `E` notation
* Fix `ProxyExt` to convert API value to `BStatusBoolean` for bool points

## Version 0.1 (5-Jun-2021)
* Initial MVP
4 changes: 3 additions & 1 deletion novant/novant-rt/src/io/novant/point/BNovantProxyExt.java
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,9 @@ public void updateVal(Object val)
if (val instanceof Double)
{
double dval = ((Double)val).doubleValue();
readOk(new BStatusNumeric(dval));
if (isBoolean()) readOk(new BStatusBoolean(dval > 0));
else if (isNumeric()) readOk(new BStatusNumeric(dval));
else readFail("Unsupported point type");
}
else
{
Expand Down

0 comments on commit 8a20ce4

Please sign in to comment.