mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-06-06 16:32:49 +00:00
Fixed incorrect time/date configuration data order in the TempDataLogger host application.
This commit is contained in:
parent
7cd9e0dbc4
commit
a899ee0cf4
@ -47,6 +47,7 @@
|
|||||||
* - Fixed incorrect HID report descriptor generated for button multiples of 8 by the HID_DESCRIPTOR_MOUSE() and HID_DESCRIPTOR_JOYSTICK()
|
* - Fixed incorrect HID report descriptor generated for button multiples of 8 by the HID_DESCRIPTOR_MOUSE() and HID_DESCRIPTOR_JOYSTICK()
|
||||||
* macros
|
* macros
|
||||||
* - Fixed race condition in the DFU class bootloader causing failed device reprogramming in some circumstances (thanks to Luis Mendes)
|
* - Fixed race condition in the DFU class bootloader causing failed device reprogramming in some circumstances (thanks to Luis Mendes)
|
||||||
|
* - Fixed incorrect time/date configuration data order in the TempDataLogger host application (thanks to David Lazarus)
|
||||||
*
|
*
|
||||||
* \section Sec_ChangeLog130303 Version 130303
|
* \section Sec_ChangeLog130303 Version 130303
|
||||||
* <b>New:</b>
|
* <b>New:</b>
|
||||||
|
@ -31,12 +31,12 @@ namespace Project1HostApp
|
|||||||
{
|
{
|
||||||
Byte[] Report = new Byte[7];
|
Byte[] Report = new Byte[7];
|
||||||
|
|
||||||
Report[0] = this.Day;
|
Report[0] = this.Hour;
|
||||||
Report[1] = this.Month;
|
Report[1] = this.Minute;
|
||||||
Report[2] = this.Year;
|
Report[2] = this.Second;
|
||||||
Report[3] = this.Hour;
|
Report[3] = this.Day;
|
||||||
Report[4] = this.Minute;
|
Report[4] = this.Month;
|
||||||
Report[5] = this.Second;
|
Report[5] = this.Year;
|
||||||
Report[6] = this.LogInterval500MS;
|
Report[6] = this.LogInterval500MS;
|
||||||
|
|
||||||
return Report;
|
return Report;
|
||||||
@ -44,12 +44,12 @@ namespace Project1HostApp
|
|||||||
|
|
||||||
public void FromReport(Byte[] Report)
|
public void FromReport(Byte[] Report)
|
||||||
{
|
{
|
||||||
this.Day = Report[0];
|
this.Hour = Report[0];
|
||||||
this.Month = Report[1];
|
this.Minute = Report[1];
|
||||||
this.Year = Report[2];
|
this.Second = Report[2];
|
||||||
this.Hour = Report[3];
|
this.Day = Report[3];
|
||||||
this.Minute = Report[4];
|
this.Month = Report[4];
|
||||||
this.Second = Report[5];
|
this.Year = Report[5];
|
||||||
this.LogInterval500MS = Report[6];
|
this.LogInterval500MS = Report[6];
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -127,6 +127,7 @@ namespace Project1HostApp
|
|||||||
|
|
||||||
ConnectionHandle.Read(0x00, Report);
|
ConnectionHandle.Read(0x00, Report);
|
||||||
DeviceReport.FromReport(Report);
|
DeviceReport.FromReport(Report);
|
||||||
|
String msgText = "Device parameters retrieved successfully.";
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@ -143,6 +144,12 @@ namespace Project1HostApp
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
msgText = "Problem reading device:\n" +
|
||||||
|
ex.Message +
|
||||||
|
"\nY:" + DeviceReport.Year.ToString() +
|
||||||
|
" M:" + DeviceReport.Month.ToString() +
|
||||||
|
" D:" + DeviceReport.Day.ToString() +
|
||||||
|
"\n\nUsing current date and time.";
|
||||||
dtpDate.Value = DateTime.Now;
|
dtpDate.Value = DateTime.Now;
|
||||||
dtpTime.Value = DateTime.Now;
|
dtpTime.Value = DateTime.Now;
|
||||||
}
|
}
|
||||||
@ -156,7 +163,7 @@ namespace Project1HostApp
|
|||||||
nudLogInterval.Value = nudLogInterval.Minimum;
|
nudLogInterval.Value = nudLogInterval.Minimum;
|
||||||
}
|
}
|
||||||
|
|
||||||
MessageBox.Show("Device parameters retrieved successfully.");
|
MessageBox.Show(msgText);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user