Changing decToInt to numToInt (adds support for Hex number interpreter)

- CLI now works with hex or decimal numbers
- Hex requires 0x (technically just x would work too)
This commit is contained in:
Jacob Alexander 2014-08-16 12:07:25 -07:00
parent 662d1f557f
commit d6d792fdf9
10 changed files with 54 additions and 31 deletions

View file

@ -276,7 +276,7 @@ void cliFunc_setKeys( char* args )
break;
// Add the USB code to be sent
USBKeys_ArrayCLI[USBKeys_SentCLI] = decToInt( arg1Ptr );
USBKeys_ArrayCLI[USBKeys_SentCLI] = numToInt( arg1Ptr );
}
}
@ -289,6 +289,6 @@ void cliFunc_setMod( char* args )
char* arg2Ptr;
CLI_argumentIsolation( args, &arg1Ptr, &arg2Ptr );
USBKeys_ModifiersCLI = decToInt( arg1Ptr );
USBKeys_ModifiersCLI = numToInt( arg1Ptr );
}

View file

@ -214,7 +214,7 @@ void cliFunc_setKeys( char* args )
break;
// Add the USB code to be sent
USBKeys_ArrayCLI[USBKeys_SentCLI] = decToInt( arg1Ptr );
USBKeys_ArrayCLI[USBKeys_SentCLI] = numToInt( arg1Ptr );
}
}
@ -227,6 +227,6 @@ void cliFunc_setMod( char* args )
char* arg2Ptr;
CLI_argumentIsolation( args, &arg1Ptr, &arg2Ptr );
USBKeys_ModifiersCLI = decToInt( arg1Ptr );
USBKeys_ModifiersCLI = numToInt( arg1Ptr );
}

View file

@ -278,7 +278,7 @@ void cliFunc_setKeys( char* args )
break;
// Add the USB code to be sent
USBKeys_ArrayCLI[USBKeys_SentCLI] = decToInt( arg1Ptr );
USBKeys_ArrayCLI[USBKeys_SentCLI] = numToInt( arg1Ptr );
}
}
@ -291,6 +291,6 @@ void cliFunc_setMod( char* args )
char* arg2Ptr;
CLI_argumentIsolation( args, &arg1Ptr, &arg2Ptr );
USBKeys_ModifiersCLI = decToInt( arg1Ptr );
USBKeys_ModifiersCLI = numToInt( arg1Ptr );
}