This commit is contained in:
Kuba 2023-11-04 09:15:31 +00:00
commit fcd0ae0fcd
2 changed files with 6 additions and 6 deletions

View File

@ -23,7 +23,7 @@ You can now clone the repository. A script (install.sh) is there for easy instal
```sh ```sh
git clone https://github.com/KubaPro010/rpitx2 git clone https://github.com/KubaPro010/rpitx2
cd rpitx cd rpitx2
./install.sh ./install.sh
``` ```
Make a reboot in order to use **rpitx2** in a stable state. Make a reboot in order to use **rpitx2** in a stable state.

View File

@ -201,15 +201,15 @@ int tx(uint32_t carrier_freq, char *audio_file, uint16_t pi, char *ps, char *rt,
if(pollResult.res == CONTROL_PIPE_PS_SET) { if(pollResult.res == CONTROL_PIPE_PS_SET) {
varying_ps = 0; varying_ps = 0;
} else if(pollResult.res == CONTROL_PIPE_RDS_SET) { } else if(pollResult.res == CONTROL_PIPE_RDS_SET) {
drds = atoi(pollResult.arg); drds = std::stoi(pollResult.arg);
} else if(pollResult.res == CONTROL_PIPE_PWR_SET) { } else if(pollResult.res == CONTROL_PIPE_PWR_SET) {
pad_reg[GPIO_PAD_0_27] = 0x5a000018 + (int)pollResult.arg; pad_reg[GPIO_PAD_0_27] = 0x5a000018 + std::stoi(pollResult.arg);
pad_reg[GPIO_PAD_28_45] = 0x5a000018 + (int)pollResult.arg; pad_reg[GPIO_PAD_28_45] = 0x5a000018 + std::stoi(pollResult.arg);
} else if(pollResult.res == CONTROL_PIPE_DEVIATION_SET) { } else if(pollResult.res == CONTROL_PIPE_DEVIATION_SET) {
deviation = atoi(pollResult.arg); deviation = atoi(pollResult.arg);
deviation_scale_factor= 0.1 * (deviation ); deviation_scale_factor= 0.1 * (deviation );
} else if(pollResult.res == CONTROL_PIPE_STEREO_SET) { } else if(pollResult.res == CONTROL_PIPE_STEREO_SET) {
disablestereo = atoi(pollResult.arg); disablestereo = std::stoi(pollResult.arg);
} else if(pollResult.res == CONTROL_PIPE_GAIN_SET) { } else if(pollResult.res == CONTROL_PIPE_GAIN_SET) {
gaim = std::stof(pollResult.arg); gaim = std::stof(pollResult.arg);
} else if(pollResult.res == CONTROL_PIPE_COMPRESSORDECAY_SET) { } else if(pollResult.res == CONTROL_PIPE_COMPRESSORDECAY_SET) {
@ -217,7 +217,7 @@ int tx(uint32_t carrier_freq, char *audio_file, uint16_t pi, char *ps, char *rt,
} else if(pollResult.res == CONTROL_PIPE_COMPRESSORATTACK_SET) { } else if(pollResult.res == CONTROL_PIPE_COMPRESSORATTACK_SET) {
compressor_attack = std::stof(pollResult.arg); compressor_attack = std::stof(pollResult.arg);
} else if(pollResult.res == CONTROL_PIPE_CT_SET) { } else if(pollResult.res == CONTROL_PIPE_CT_SET) {
rds_ct_enabled = atoi(pollResult.arg); rds_ct_enabled = std::stoi(pollResult.arg);
} else if(pollResult.res == CONTROL_PIPE_RDSVOL_SET) { } else if(pollResult.res == CONTROL_PIPE_RDSVOL_SET) {
rds_volume = std::stof(pollResult.arg); rds_volume = std::stof(pollResult.arg);
} }