File tree Expand file tree Collapse file tree 3 files changed +8
-6
lines changed
Expand file tree Collapse file tree 3 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -94,7 +94,7 @@ class ProgramListCards : public Program
9494
9595 // Pad the serial with 0s if necessary
9696 // It should always be used as 3 chars to avoid conflicts with the sequence id
97- boost::format serialFormat (" %03d " );
97+ boost::format serialFormat (" %04d " );
9898 serialFormat % std::to_string (card.serialId .getSerial ());
9999
100100 std::string serial = serialFormat.str ();
Original file line number Diff line number Diff line change @@ -81,12 +81,13 @@ boost::optional<int32_t> CrorcBar::getSerialNumber()
8181 return Crorc::getSerial (*(mPdaBar .get ()));
8282 } else {
8383 // Register format e.g. 0x32343932
84- // transltes to -> 2942 -> 942 (keep 3)
84+ // transltes to -> 2942
8585 std::stringstream serialString;
8686
8787 serialString << char (serial & 0xff )
8888 << char ((serial & 0xff00 ) >> 8 )
89- << char ((serial & 0xff0000 ) >> 16 );
89+ << char ((serial & 0xff0000 ) >> 16 )
90+ << char ((serial & 0xff000000 ) >> 24 );
9091
9192 try {
9293 return std::stoi (serialString.str ());
Original file line number Diff line number Diff line change @@ -280,13 +280,14 @@ boost::optional<int32_t> CruBar::getSerialNumber()
280280 boost::optional<int32_t > serial = eeprom.getSerial ();
281281 return serial;
282282 } else { // v3.6.3+
283- // Register format e.g. 0x343230
284- // translates to -> 024
283+ // Register format e.g. 0x35343230
284+ // translates to -> 0245
285285 std::stringstream serialString;
286286
287287 serialString << char (serial & 0xff )
288288 << char ((serial & 0xff00 ) >> 8 )
289- << char ((serial & 0xff0000 ) >> 16 );
289+ << char ((serial & 0xff0000 ) >> 16 )
290+ << char ((serial & 0xff000000 ) >> 24 );
290291
291292 try {
292293 return std::stoi (serialString.str ());
You can’t perform that action at this time.
0 commit comments