return -1 when no battery
clear canvas when deleting context