Display Channel Name @ Start

This commit is contained in:
tuxphone 2020-09-21 21:56:31 +02:00 committed by GitHub
parent 5f97fa0f47
commit 30029c5c8d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -38,7 +38,7 @@ void setup() {
RadioEvents.RxDone = RxDone; RadioEvents.RxDone = RxDone;
Radio.Init( &RadioEvents ); Radio.Init( &RadioEvents );
Radio.Sleep(); Radio.Sleep();
ChanSet.name[12] = MESHTASTIC_NAME[12]; memcpy(ChanSet.name, MESHTASTIC_NAME, 12);
ChanSet.channel_num = hash( MESHTASTIC_NAME ) % NUM_CHANNELS; // see MeshRadio.h ChanSet.channel_num = hash( MESHTASTIC_NAME ) % NUM_CHANNELS; // see MeshRadio.h
ChanSet.tx_power = TX_OUTPUT_POWER; ChanSet.tx_power = TX_OUTPUT_POWER;
/* FYI: /* FYI:
@ -200,6 +200,7 @@ void ConfigureRadio( ChannelSettings ChanSet )
uint32_t freq = (CH0 + CH_SPACING * ChanSet.channel_num)*1E6; uint32_t freq = (CH0 + CH_SPACING * ChanSet.channel_num)*1E6;
#ifndef SILENT #ifndef SILENT
Serial.printf("\nSetting frequency to %i Hz (meshtastic channel %i) .. \n",freq,ChanSet.channel_num ); Serial.printf("\nSetting frequency to %i Hz (meshtastic channel %i) .. \n",freq,ChanSet.channel_num );
Serial.printf("Channel name is %s .. \n", ChanSet.name );
Serial.printf("Setting bandwidth to index %i ..\n",ChanSet.bandwidth); Serial.printf("Setting bandwidth to index %i ..\n",ChanSet.bandwidth);
Serial.printf("Setting CodeRate to index %i .. \n", ChanSet.coding_rate); Serial.printf("Setting CodeRate to index %i .. \n", ChanSet.coding_rate);
Serial.printf("Setting SpreadingFactor to %i ..\n",ChanSet.spread_factor); Serial.printf("Setting SpreadingFactor to %i ..\n",ChanSet.spread_factor);