@@ -10,7 +10,7 @@ void selectTraining()
1010// Generate new netID/AES key to share
1111// We assume the user needs to maintain their settings (airSpeed, numberOfChannels, freq min/max, bandwidth/spread/hop)
1212// but need to be on a different netID/AES key.
13- void generateRandomKeysID ()
13+ void generateRandomKeysID (Settings * radioSettings )
1414{
1515 if ((settings.debug == true ) || (settings.debugTraining == true ))
1616 {
@@ -22,24 +22,24 @@ void generateRandomKeysID()
2222 randomSeed (radio.randomByte ());
2323
2424 // Generate new NetID
25- settings. netID = random (0 , 256 ); // Inclusive, exclusive
25+ radioSettings-> netID = random (0 , 256 ); // Inclusive, exclusive
2626
2727 // Generate new AES Key. User may not be using AES but we still need both radios to have the same key in case they do enable AES.
2828 for (int x = 0 ; x < 16 ; x++)
29- settings. encryptionKey [x] = random (0 , 256 ); // Inclusive, exclusive
29+ radioSettings-> encryptionKey [x] = random (0 , 256 ); // Inclusive, exclusive
3030
3131 // We do not generate new AES Initial Values here. Those are generated during generateHopTable() based on the unit's settings.
3232
3333 if ((settings.debug == true ) || (settings.debugTraining == true ))
3434 {
3535 systemPrint (" Select new NetID: " );
36- systemPrintln (settings. netID );
36+ systemPrintln (radioSettings-> netID );
3737
3838 systemPrint (" Select new Encryption Key:" );
3939 for (uint8_t i = 0 ; i < 16 ; i++)
4040 {
4141 systemPrint (" " );
42- systemPrint (settings. encryptionKey [i], HEX);
42+ systemPrint (radioSettings-> encryptionKey [i], HEX);
4343 }
4444 systemPrintln ();
4545 outputSerialData (true );
0 commit comments