[GitHub] [mynewt-mcumgr] greg-leach commented on a change in pull request #112: Bug #18312 Add support for half-floats to MCUMGR
greg-leach commented on a change in pull request #112: URL: https://github.com/apache/mynewt-mcumgr/pull/112#discussion_r576629784 ## File path: cborattr/src/cborattr.c ## @@ -67,6 +67,11 @@ valid_attr_type(CborType ct, CborAttrType at) } break; #if FLOAT_SUPPORT +case CborAttrHalfFloatType: +if (ct == CborHalfFloatType) { +return 1; +} +break; Review comment: Definitely yes. The half float type will only be used when CBOR is compacting float data into a half float type to save on message space. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [mynewt-mcumgr] greg-leach commented on a change in pull request #112: Bug #18312 Add support for half-floats to MCUMGR
greg-leach commented on a change in pull request #112: URL: https://github.com/apache/mynewt-mcumgr/pull/112#discussion_r576629119 ## File path: cborattr/include/cborattr/cborattr.h ## @@ -85,6 +86,9 @@ struct cbor_array_t { struct { double *store; } reals; +struct{ +int *store; +} halffloats; Review comment: The thinking here was to use standard C types, looking further on in the code I can see uint16_t being used. I've updated the halffloat to be a uint16_t type. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org