private void cbDevices_SelectedIndexChanged(object sender, EventArgs e)
{
if (CurrentC2Device != null)
{
StartAddr.Text = "0x0000";
EndAddr.Text = addressToText(CurrentC2Device.Bottom - 1);
Response response = sendCommand(0, SET_FPDAT_ADDRESS, CurrentC2Device.FPREG);
setStatus(string.Format("SET_FPDAT_ADDRESS:{0:X2}", CurrentC2Device.FPREG), response);
if (response.Result == ResponseCode.COMMAND_OK)
{
}
response = sendCommand(1, GET_FPDAT_ADDRESS);
if (response.Result == ResponseCode.COMMAND_OK)
{
if (response.Raw[0] != CurrentC2Device.FPREG)
MessageBox.Show("GET_FPDAT_ADDRESS failure");
}
else
setStatus("GET_FPDAT_ADDRESS", response);
}
}
#endregion