Steel Soldiers now has a few new forums, read more about it at: New Munitions Forums!
Microsoft MSN, Live, Hotmail, Outlook email users may not be receiving emails. We are working to resolve this issue. Please add support@steelsoldiers.com to your trusted contacts.
Oh yes for sure I wasn't meaning your code specifically just to future readers really...your code was just handy to use as an example, for the others reading this and the sir/madam that asked about the math it is basically just this (again using kloppk's code as an example haha
uint8_t...
Depending on how decent you are at bitwise operators or coding style I find something like
// Bus Frequency Row 12
int Pval = (DCSParams[12][5] << 24) | (DCSParams[12][4] << 16) | (DCSParams[12][3] << 8) | DCSParams[12][2];
float PvalFloat = static_cast<float>(Pval) / 1000.0;
Serial.print("Row...
could be, like I said I can't really make heads or tails of it in the code I just know it runs some coms on the main thread and then spawns a new thread and switches to that after some communication has taken place
Ya something is weird in the code on initial connection, it seems it starts comms on the ui thread and then spawns a new thread just for comms and uses that from then forward, but only after it has requested data the first time...not sure if an oversight or intended but that may describe why it...
I can in the software but im emulating the generator, I dont have a genset to make an emulator for the software, that side of things is up to kloppk he has a 1030 xd
Yea its very trivial, my library makes it pretty easy
int main() {
bool is_connected = false;
while (!is_connected) {
std::cout << "Please choose a port number to connect." << std::endl;
int user_port;
std::cin >> user_port;
is_connected =...
yep was a typo i fixed it, that B1 28 corresponds to "ON" number 4 on your sheet, im gonna guess it battle short u will have to test to see if the response is a 1 with battle short on
if ( CParamDataModel2::GetEnumIndex((CWnd *)((char *)v112 + 212), 0x28B1u) )
v9 = "ON";
else...
GenSet Voltage L1-L2 = 12 2
GenSet Voltage L2-L3 = 13 2
GenSet Voltage L3-L1 = 14 2
Bus Voltage L1-L2 = 14 37
Bus Voltage L2-L3 = 3C 37
Bus Voltage L3-L1 = 64 37
GenSet Voltage L1N = unknown
GenSet Voltage L2N = unknown
GenSet Voltage L3N = unknown
Bus Voltage L1N = 16 37
Bus Voltage L2N =...
yep thats correct "93 2 [C1 2] 52 = 0x2C1 which is 705 in decimal aka 70.5% fuel level
and "93 2 [E7 9] 7F" = 0x9E7 which is 2535 in decimal or 25.35 VDC
oil pressure should be "93 2 8 2 9B"
coolant temp should be "93 2 A9 D 35"
it is defiantly fuel level I finally found all the data request commands
battery level for example u can see is a request of 0xBD1 so across serial would be "93 2 D1 B 4B"
Looking at your logs here if my theory on how the data works is correct I see a response to the fuel level as "93 02 62 00 F3".. did you have 98% fuel level?
albeit it appears that all capture is done here after initial connection
@kloppk I'm getting an unknown request (referencing your pic above) I'm trying to emulate all the responses of your 1030 however the software is requesting
"93 2 8 0 99" any idea what this request could be? I dont see it on the list above...below is an example from my debug.
Connected to port...
After rechecking more of the data the checksum is actually just all the bytes xored so "93 2 28 28" -> 93 ^ 2 ^ 28 ^ 28 = 91 so sent message = "93 2 28 28 91"
code for this here (currently making a small library to handle everything)
static std::string toString(const...
I'm just emulating a valid response to understand the data...for example kloppk posted above that "93 2 28 28 91" is a fuel level request and the response from his genset is " 93 2 FB 2 68" what does this mean? If we look at the response we can see we need to echo back the command "93" with the...
C++ just on my computer using a virtual com port at the moment, once I understand how it works I can port it to an stm32 (Arduinos will not be able to communicate since they have some lines tied high[unless you make a new pcb and reroute them but why use an arduino anyway when better MCU's exist...
Yes using the remote monitoring tool and my "emulator" to emulate it connecting to a genset, if we can figure out all the communication properly can make something cool like an stm32 or esp MCU connected to the genset and forward all data wirelessly to phone etc to monitor and do things from...
Made some progress out of boredum, I made a small c++ app to emulate a genset and am able to connect to the software and get some data but without a real machine to have to extract data from I am unsure what data to respond back with...from kloppk's data table above I may have enough to slowly...
Well before I go to bed I can get the software to respond to my virtual com ports finally...it seems to send "83 03 00 00 01 81" and if i echo that back it will then attempt to "negotiate a baud rate" and if i echo it back yet again a few time it will set a baud rate (depending on the speed i...