Use serial_readline in acquisition mode, otherwise data from the
Re:load Pro could get lost.
Use reloadpro_receive_data() for all commands when in acquisition
mode. When not using a single point of receiving data, data could get
lost.
Prefer sigrok's endianess conversion helper over the inet htons()
routine which is harder to read (is "network order" little or big?).
Writing the conversion results in units of bytes also avoids misaligned
memory access. The header length is odd, each payload item got written
as an uint16_t item to an odd address.
The config.h file must always be included as first file.
src/output/csv.c: In function 'gen_header':
src/output/csv.c:64:20: warning: format '%u' expects argument of type 'unsigned int', but argument 3 has type 'uint64_t {aka long long unsigned int}' [-Wformat=]
#define LOG_PREFIX "output/csv"
^
./src/libsigrok-internal.h:753:42: note: in expansion of macro 'LOG_PREFIX'
#define sr_info(...) sr_log(SR_LOG_INFO, LOG_PREFIX ": " __VA_ARGS__)
^
src/output/csv.c:244:3: note: in expansion of macro 'sr_info'
sr_info("Set sample period to %" PRIu64 " %s",
^
src/output/csv.c: In function 'dump_saved_values':
src/output/csv.c:462:34: warning: format '%u' expects argument of type 'unsigned int', but argument 3 has type 'uint64_t {aka long long unsigned int}' [-Wformat=]
g_string_append_printf(*out, "%" PRIu64 "%s",
^
In file included from src/hardware/ftdi-la/protocol.c:21:0:
src/hardware/ftdi-la/protocol.c: In function 'send_samples':
src/hardware/ftdi-la/protocol.h:28:20: warning: format '%u' expects argument of type 'unsigned int', but argument 3 has type 'uint64_t {aka long long unsigned int}' [-Wformat=]
#define LOG_PREFIX "ftdi-la"
^
./src/libsigrok-internal.h:751:42: note: in expansion of macro 'LOG_PREFIX'
#define sr_spew(...) sr_log(SR_LOG_SPEW, LOG_PREFIX ": " __VA_ARGS__)
^
src/hardware/ftdi-la/protocol.c:29:2: note: in expansion of macro 'sr_spew'
sr_spew("Sending %" PRIu64 " samples.", samples_to_send);
^
Optionally create multiple analog channels in serial-dmm's scan()
routine. Allow the meters' parse routines to fill in more than one
analog value from the inspection of a single packet.
Use "large" (4 times 14 bytes) packets for the Metex M-3860M and the
PeakTech 4390A meters, and have those large packets parsed by wrapping
the routines for regular 14-byte Metex packets, and sending four values
to the session bus after reception of one large packet.
Thanks to Frank Stettner <frank-stettner@gmx.net> for testing and
fixing the initial implementation of this extension.