---
--- @package   eg4-crank-ui
--- @file      battery-status.lua
--- @brief     Functionality related to the battery status.
---
--- @copyright Copyright 2019 Hanover Displays Limited.
--- @license   This program is the confidential and proprietary product of
---            Hanover Displays Limited. Any unauthorised use, reproduction or
---            transfer of this program is strictly prohibited. (Subject to 
---            limited distribution and restricted disclosure only.) All 
---            rights reserved.                                              
---

---
--- @brief  Updates the battery status.
---
--- TODO: This is currently a placeholder.
---
--- @param gre#context mapargs
---
function CBUpdateBatteryStatus(mapargs) 
  local control = mapargs.context_layer..".heading_control"
  local index = gre.get_value(control..".index") + 1
  local image = gre.get_value(control..".images." .. index .. ".1")
  if image == nil then
    image = gre.get_value(control..".images.1.1")
    index = 1
  end
  gre.set_value(control..".index", index)
  gre.set_value(control..".image", image)
end

-- EOF --
