Read firmware version that is set in 'mos.yaml'

Hi all,

I like to read the firmware version string that is set in the mos.yaml using ‘version: x.y.z’, but I cannot find the correct command.

Thanks for any help!

1 Like

Have a look at build/gen/mgos_ro_vars.h

#include "mgos.h"

#include "mgos_ro_vars.h"

enum mgos_app_init_result mgos_app_init(void) {
  LOG(LL_INFO, ("fw_version: %s", mgos_sys_ro_vars_get_fw_version()));
  return MGOS_APP_INIT_SUCCESS;
}
2 Likes