Skip to content

gForceSDK-V0.5.0

Pre-release
Pre-release
Compare
Choose a tag to compare
@zhoukaidev zhoukaidev released this 16 May 03:17
· 12 commits to master since this release
c1ab5a9

gForceSDK

Brief

gForce SDK is the software development kit for developer to access gForce armband.

Feature

Please refer to example code .

Known issue

  1. After the application exits abnormally, the connection between the gForce
    armband and the gForceDongle may remain. This will cause the next
    connection to fail when you restart the application. To work around this
    issue, you need to unplug-and-plug the gForceDongle or turn-off-and-on
    gForce armband again, and restart the application

  2. After turn on the DeviceSetting::DNF_EMG_RAW feature,the DeviceSetting::setEMGRawDataConfig must be called explicitly to configure EMG raw data parameters, otherwise will get wrong data.
    for example:

        //For more details,Please refer to sample code.
        DeviceSetting::DataNotifFlags flags;
        flags = (DeviceSetting::DataNotifFlags)
		 (DeviceSetting::DNF_OFF |  DeviceSetting::DNF_EMG_RAW);
       auto setting = device->getDeviceSetting();
	if (nullptr != setting)
	{
                // turn on the "DNF_EMG_RAW"
		setting->setDataNotifSwitch(flags, [](ResponseResult result) {
		         cout << "setDataNotifSwitch: " << static_cast<GF_UINT32>(result) << endl;
		});
              //After turn on the "DNF_EMG_RWA","setEMGRawDataConfig" must be called to
              // configure "EMG raw data" parameters
		setting->setEMGRawDataConfig(650,         //sample rate
		          (DeviceSetting::EMGRowDataChannels)(0x00FF),  //channel 0~7 
		           128,    //data length
			   8,       // adc resolution
			   [](ResponseResult result) {
				string ret = (result == ResponseResult::RREST_SUCCESS) ? ("sucess") : ("failed");
				cout << "[INFO]: Set Emg Config "<< ret << endl;
		});
	}