danieloneill / EpsolarServer

Epsolar Tracer-series logging/monitoring for Linux (and Raspberry Pi)
MIT License
31 stars 10 forks source link

Fails to compile with newer modbus version(solved) #4

Closed runsnbunsn closed 1 year ago

runsnbunsn commented 6 years ago

Took me a while to figure out, so I thought I share the info for others..

since 3.1.2 libmodbus changed their api which leads to an error in src/epsolar.cpp line 40 and 41 I found the info here: https://github.com/hazelnusse/linuxcnc/commit/5bdebef86dce6b56ecbb122f6dde29f85afbef0f

it compiles if you change line 40 & 41 to:

modbus_set_response_timeout(m_ctx, tv.tv_sec, tv.tv_usec); modbus_set_byte_timeout(m_ctx, tv.tv_sec, tv.tv_usec);

it's just a quick fix, I assume best would be to do a version check I dont know (yet) if this has any sideeffects, will report back if I find anything.