Comments (6)
Should be a uint8 or simply uint?
from libsml.
i'm not good at c-programming, but isn't that struct simply meant so carry some flag to simply store some tiny bit of information if some workaround needs to be applied again or not?
don't know what correct datatype is correct for this, i would have chosen some "bool" but not some special type which generates some compiler warning.
so i think unsigned int would be ok here and makes the compile warning go away.
should i send a pull request ?
from libsml.
by reading this, i think you are correct and "unsigned int" is correct when using bit-field:
https://www.tutorialspoint.com/cprogramming/c_bit_fields.htm
so
struct workarounds {
u8 dzg_meter:1;
};
should be
struct workarounds {
unsigned int dzg_meter : 1;
};
from libsml.
this can be closed after merging the pull request
from libsml.
Bzw.: sollte das nicht lieber ein uint8_t sein (https://stackoverflow.com/questions/22842707/size-of-uint8-uint16-and-uint32#22843368) damit es wirklich 8-bittig bleibt? Oder ist uns das egal?
from libsml.
could you also close this one @andig ? (as i see that my fix proposal has been merged)
sorry, i did not see your question and i cannot answer, as my c-skills are not good enough
from libsml.
Related Issues (20)
- Unsigned current Power Value HOT 9
- timeout HOT 6
- libsml crc enhancements ? HOT 10
- DZG workaround not necessary anymore HOT 20
- Add support for efr SGM-C4 meter
- sml_server does not decode testfile from eBZ DD3 2R06 HOT 2
- SML-Errors with Holley DTZ541 HOT 2
- hexdump() compatibility issue with newest Arduino / ESP8266 libraries HOT 8
- libsml debian package still points to dailab repo HOT 3
- Cannot Build on Raspberry Debian 11 with gcc version 10.2.1 HOT 2
- sml_server does not decode data from device DZMeteringGmbH_WS_7412.1 (negative values) HOT 15
- sml_server not part of libsml1 debian package HOT 7
- Odd readings from DWSB20.2TH: Display shows power -195W, vzlogger reports 460W HOT 15
- List of projects using libsml HOT 3
- How to use libsml in ESPhome? HOT 3
- deprecate / replace `sml_transport` API
- support arduino?
- DZG - libsml: error: unrecognized sequence HOT 8
- More Examples HOT 6
- Compile Error on Alpine: no member named '__jmpbuf' HOT 13
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libsml.