"""Simple program to demo how to use meshtastic library.
   To run: python examples/info.py
"""

import meshtastic
import meshtastic.serial_interface

from enum import Enum

interface = meshtastic.serial_interface.SerialInterface()
node = interface.getNode('^local')

print ("Power Measurement Enabled: " + str(node.moduleConfig.telemetry.power_measurement_enabled))

"""
telemetry:
    telemetry.air_quality_enabled
    telemetry.air_quality_interval
    telemetry.device_update_interval
    telemetry.environment_display_fahrenheit
    telemetry.environment_measurement_enabled
    telemetry.environment_screen_enabled
    telemetry.environment_update_interval
    telemetry.health_measurement_enabled
    telemetry.health_update_interval
    telemetry.power_measurement_enabled
    telemetry.power_screen_enabled
    telemetry.power_update_interval
"""

"""
node.moduleConfig.telemetry.power_measurement_enabled = True
node.writeConfig("telemetry")
"""

interface.close()
