趣味で作ってるロボット用ソフトウェア
 All Classes Files Functions Enumerations Enumerator Friends Pages
battery_example.cpp

Battery の動作サンプル

#include <iostream>
#include <SDL.h>
#include "Battery.h"
using namespace hrk;
using namespace std;
int main(int argc, char *argv[])
{
static_cast<void>(argc);
static_cast<void>(argv);
Battery battery;
cout << "Battery class" << endl
<< "is_available(): " << battery.is_available() << endl
<< "is_charging(): " << battery.is_charging() << endl
<< "remaining_percent(): " << battery.remaining_percent() << endl
<< "remaining_second(): " << battery.remaining_second()
<< endl;
return 0;
}