Skip to content

libs/utils/energy: fix initialization of ACME

Darryl Green requested to merge fix-acme-iio_capture-initialization into master

Created by: jlelli

ACME energy meter supports multiple channels and initialization of such channels uses a map that associates a channel id with a human understandable name. The current code translate this information to a fixed length array and this causes a problem if devices ids are not contiguous or if not all devices are in use, e.g.

"channel_map" : { "Device1" : 1, # iio:device1 }

Keep the map association as is by using a dictionary instead of an array.

Merge request reports