#
GPIO_INCLUDE=GPIO
+# uncomment if level control (power output) is software based
+LEVEL_CTRL=SW_LEVEL_CTRL
+
# uncomment the line below to include Pure Signal support
#PURESIGNAL_INCLUDE=PURESIGNAL
CC=gcc
LINK=gcc
+ifeq ($(LEVEL_CTRL),SW_LEVEL_CTRL)
+LEVEL_OPTIONS=-D SW_LEVEL_CTRL
+endif
+
ifeq ($(MIDI_INCLUDE),MIDI)
MIDI_OPTIONS=-D MIDI
MIDI_HEADERS= midi.h midi_menu.h
CFLAGS= -Wno-deprecated-declarations -O3
# CFLAGS= -Wno-deprecated-declarations -O3 -mcpu=cortex-a72 -mfloat-abi=hard -mfpu=neon-fp-armv8 -mneon-for-64bits
-OPTIONS=$(SMALL_SCREEN_OPTIONS) $(MIDI_OPTIONS) $(PURESIGNAL_OPTIONS) $(REMOTE_OPTIONS) $(USBOZY_OPTIONS) \
+OPTIONS=$(SMALL_SCREEN_OPTIONS) $(MIDI_OPTIONS) $(LEVEL_OPTIONS) $(PURESIGNAL_OPTIONS) $(REMOTE_OPTIONS) $(USBOZY_OPTIONS) \
$(GPIO_OPTIONS) $(GPIOD_OPTIONS) $(LOCALCW_OPTIONS) \
$(PTT_OPTIONS) \
$(SERVER_OPTIONS) \
}
if (isTransmitting()) {
-
+#ifdef SW_LEVEL_CTRL
+ if((radio->device==NEW_DEVICE_ATLAS && atlas_penelope) ||
+ (radio->device == DEVICE_HERMES_LITE2)) {
+#else
if(radio->device==NEW_DEVICE_ATLAS && atlas_penelope) {
+#endif
//
// On these boards, drive level changes are performed by
// scaling the TX IQ samples. In the other cases, DriveLevel
ramp=cw_shape_buffer48[j]; // between 0.0 and 1.0
qsample=floor(gain*ramp+0.5); // always non-negative, isample is just the pulse envelope
sidetone=sidevol * ramp * getNextInternalSideToneSample();
+
+ isample = isample >= 0.0 ? (long)floor(isample * gain + 0.5) : (long)ceil(isample * gain - 0.5);
+ qsample = qsample >= 0.0 ? (long)floor(qsample * gain + 0.5) : (long)ceil(qsample * gain - 0.5);
+
old_protocol_iq_samples_with_sidetone(isample,qsample,sidetone);
}
break;
for(j=0;j<tx->output_samples;j++) {
ramp=cw_shape_buffer192[j]; // between 0.0 and 1.0
qsample=floor(gain*ramp+0.5); // always non-negative, isample is just the pulse envelope
+
+ isample = isample >= 0.0 ? (long)floor(isample * gain + 0.5) : (long)ceil(isample * gain - 0.5);
+ qsample = qsample >= 0.0 ? (long)floor(qsample * gain + 0.5) : (long)ceil(qsample * gain - 0.5);
+
new_protocol_iq_samples(isample,qsample);
}
break;
is=tx->iq_output_buffer[j*2];
qs=tx->iq_output_buffer[(j*2)+1];
}
- isample=is>=0.0?(long)floor(is*gain+0.5):(long)ceil(is*gain-0.5);
- qsample=qs>=0.0?(long)floor(qs*gain+0.5):(long)ceil(qs*gain-0.5);
+ isample = is >= 0.0 ? (long)floor(is * gain + 0.5) : (long)ceil(is * gain - 0.5);
+ qsample = qs >= 0.0 ? (long)floor(qs * gain + 0.5) : (long)ceil(qs * gain - 0.5);
switch(protocol) {
case ORIGINAL_PROTOCOL:
old_protocol_iq_samples(isample,qsample);