Detect WIO Terminal battery/usb power

Hello,

With the new WIO Terminal battery chassis, is there a way to detect that the WIO Terminal is powered by USB vs battery? I want to be able to detect that USB power is no longer present and then take an action while on battery power.

Thanks!

Jason