Skip to content

Commit 6191025

Browse files
committed
2.0rc5
1 parent 7490be2 commit 6191025

File tree

7 files changed

+40
-12
lines changed

7 files changed

+40
-12
lines changed

.github/workflows/build-all.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,6 @@ jobs:
3636
- name: Save artifacts
3737
uses: actions/upload-artifact@v4
3838
with:
39-
name: firmware
39+
name: radpro-firmware-snapshot
4040
overwrite: true
4141
path: tools/*.bin

RELEASES.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@
44

55
* Added Bosean FS-5000 support.
66
* Added secondary dose view in average measurement mode.
7+
* Extended conversion factor range to 25-1600 cpm/µSv/h.
78
* Added "SET tubeHVFrequency" and "SET tubeHVDutyCycle" data communication commands.
89
* Added 1 second datalog interval options and removed 30 seconds and 30 minutes datalog interval options.
910
* Added 12-hour time format.
10-
* Devices with data mode allow using the device wile data mode is active.
11+
* Devices with data mode allow using the device wile data mode is active; data mode state is also preserved after powering off.
1112
* Improved battery level indicator on the Bosean FS-600/FS-1000.
1213
* Improved keyboard control scheme of the Bosean FS-1000.
1314
* Changed data communications end of line to "\r\n".

platform.io/lib/stm32/stm32-ext.h

+16
Original file line numberDiff line numberDiff line change
@@ -785,6 +785,22 @@ typedef struct
785785

786786
#endif
787787

788+
#if defined(STM32L4)
789+
790+
__STATIC_INLINE void adc_enable_deep_power_down(ADC_TypeDef *base)
791+
{
792+
set_bits(base->CR,
793+
ADC_CR_DEEPPWD);
794+
}
795+
796+
__STATIC_INLINE void adc_disable_deep_power_down(ADC_TypeDef *base)
797+
{
798+
clear_bits(base->CR,
799+
ADC_CR_DEEPPWD);
800+
}
801+
802+
#endif
803+
788804
#if defined(STM32G0) || defined(STM32L4)
789805

790806
__STATIC_INLINE void adc_enable_vreg(ADC_TypeDef *base)

platform.io/src/comm.c

+8-5
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,11 @@ void initComm(void)
3333
#if !defined(DATA_MODE)
3434
startComm();
3535
#else
36+
if (settings.dataMode)
37+
startComm();
38+
3639
selectMenuItem(&dataModeMenu,
37-
0,
40+
settings.dataMode,
3841
2);
3942
#endif
4043
}
@@ -186,8 +189,8 @@ void dispatchCommEvents(void)
186189
else if (matchCommCommand("GET tubeHVFrequency"))
187190
sendCommOkWithFloat(getTubeHVFrequency(), 2);
188191
else if (matchCommCommandWithNumber("SET tubeHVFrequency",
189-
&mantissa,
190-
&factor))
192+
&mantissa,
193+
&factor))
191194
{
192195
setTubeHVFrequency((float)mantissa / (float)factor);
193196

@@ -196,8 +199,8 @@ void dispatchCommEvents(void)
196199
else if (matchCommCommand("GET tubeHVDutyCycle"))
197200
sendCommOkWithFloat(getTubeHVDutyCycle(), 4);
198201
else if (matchCommCommandWithNumber("SET tubeHVDutyCycle",
199-
&mantissa,
200-
&factor))
202+
&mantissa,
203+
&factor))
201204
{
202205
setTubeHVDutyCycle((float)mantissa / (float)factor);
203206

platform.io/src/settings.h

+8-4
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,9 @@ enum
103103
};
104104

105105
#define TUBE_CONVERSIONFACTOR_VALUE_MIN 25.0F
106-
#define TUBE_CONVERSIONFACTOR_VALUE_MAX 800.01F
107-
#define TUBE_CONVERSIONFACTOR_VALUE_LOG_MAX_MIN 5.0F
108-
#define TUBE_CONVERSIONFACTOR_VALUE_NUM 81
106+
#define TUBE_CONVERSIONFACTOR_VALUE_MAX 1600.01F
107+
#define TUBE_CONVERSIONFACTOR_VALUE_LOG_MAX_MIN 6.0F
108+
#define TUBE_CONVERSIONFACTOR_VALUE_NUM 97
109109
#define TUBE_CONVERSIONFACTOR_NUM (TUBE_CONVERSIONFACTOR_PRESETS_NUM + TUBE_CONVERSIONFACTOR_VALUE_NUM)
110110

111111
enum
@@ -359,7 +359,7 @@ typedef struct
359359
unsigned int tubeInstantaneousAveraging : 3;
360360
unsigned int tubeDeadTimeCompensation : 6;
361361
unsigned int tubeBackgroundCompensation : 4;
362-
#if defined(TUBE_HV_PWM)
362+
#if defined(TUBE_HV_PWM)
363363
unsigned int tubeHVProfile : 3;
364364
unsigned int tubeHVFrequency : 3;
365365
unsigned int tubeHVDutyCycle : 9;
@@ -390,6 +390,10 @@ typedef struct
390390
unsigned int batteryType : 1;
391391
#endif
392392

393+
#if defined(DATA_MODE)
394+
unsigned int dataMode : 1;
395+
#endif
396+
393397
unsigned int gameStrength : 3;
394398
} Settings
395399
#if defined(STM32G0) || defined(STM32L4)

platform.io/src/stm32/stm32_adc.c

+4
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ void initADC(void)
4242

4343
rcc_enable_adc(ADC1);
4444

45+
#if defined(STM32L4)
46+
adc_disable_deep_power_down(ADC1);
47+
#endif
48+
4549
#if (defined(STM32F0) && defined(GD32)) || defined(STM32F1)
4650
adc_enable(ADC1);
4751
sleep(1);

platform.io/src/system.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
#define FIRMWARE_AUTHOR "Gissio"
1818
#define FIRMWARE_NAME "Rad Pro"
19-
#define FIRMWARE_VERSION "2.0rc5-test13"
19+
#define FIRMWARE_VERSION "2.0rc5-test14"
2020

2121
extern const View statisticsView;
2222

0 commit comments

Comments
 (0)