Many little changes to get rid of compile-time warnings.
There now should be no warnings when compiling on LINUX. YMMV elsewhere.
This commit is contained in:
@@ -51,9 +51,8 @@ MotorControllerConfigWindow::~MotorControllerConfigWindow()
|
||||
void MotorControllerConfigWindow::updatedFrames(int numFrames)
|
||||
{
|
||||
CANFrame thisFrame;
|
||||
int id;
|
||||
int param;
|
||||
QTableWidgetItem *item;
|
||||
uint32_t id;
|
||||
QTableWidgetItem *item = nullptr;
|
||||
if (numFrames == -1) //all frames deleted
|
||||
{
|
||||
|
||||
@@ -74,12 +73,12 @@ void MotorControllerConfigWindow::updatedFrames(int numFrames)
|
||||
{
|
||||
if ((char)thisFrame.payload()[2] == 0)
|
||||
{
|
||||
int paramID = thisFrame.payload()[0] + (thisFrame.payload()[1] * 256);
|
||||
uint32_t paramID = static_cast<uint32_t>(thisFrame.payload()[0] + (thisFrame.payload()[1] * 256));
|
||||
for (int i = 0; i < params.length(); i++)
|
||||
{
|
||||
if (params[i].paramID == paramID)
|
||||
{
|
||||
params[i].value = thisFrame.payload()[4] + (thisFrame.payload()[5] * 256);
|
||||
params[i].value = static_cast<uint16_t>(thisFrame.payload()[4] + (thisFrame.payload()[5] * 256));
|
||||
if (params[i].paramType == ASCII) item = new QTableWidgetItem(); //QString::fromUtf8((char *)params[i].value, 2));
|
||||
if (params[i].paramType == HEX) item = new QTableWidgetItem(Utility::formatHexNum(params[i].value));
|
||||
if (params[i].paramType == DEC)
|
||||
|
||||
Reference in New Issue
Block a user