Skip to content

Commit

Permalink
Minor bugfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mressl committed Jun 19, 2023
1 parent 34f8d62 commit e0ba9cb
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 21 deletions.
21 changes: 11 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
## Overview

Rad Pro (formerly FS2011 Pro) is an open-source firmware that enhances the capabilities of portable radiation detectors/Geiger counters. Currently the [FS2011](https://www.amazon.com/s?k=fs2011) is supported. Updates to support the [Bosean FS-600](https://www.bosean.net/products/nuclear_radiation_detector.html) and [Bosean FS-1000](https://www.bosean.net/products/FS-1000_nuclear_radiation_detector.html) are planned.
Rad Pro (formerly FS2011 Pro) is a custom firmware that enhances the capabilities of the [FS2011](https://www.amazon.com/s?k=fs2011) radiation detector/Geiger counter. Support for the [Bosean FS-600](https://www.bosean.net/products/nuclear_radiation_detector.html) and [Bosean FS-1000](https://www.bosean.net/products/FS-1000_nuclear_radiation_detector.html) is planned.

Watch a demonstration of Rad Pro in action:

[![Rad Pro Demonstration](docs/img/radpro-video.jpg)](https://www.youtube.com/watch?v=7dpVG1jSLn8)

## Features

* Intuitive user interface for easy navigation and hassle-free experience.
* Intuitive user interface for easy navigation.
* Instantaneous rate, average rate, dose, and history modes.
* Measurements in Sievert, rem, cpm and cps.
* Customizable rate and dose alarms.
* Measurement hold for instantaneous rate, average rate, and dose.
* Storage of radiation dose in non-volatile memory.
* Multiple history periods, including 2-minute, 10-minute, 1-hour, 6-hour and 24-hour options.
* Multiple history periods, including 2 minute, 10 minute, 1 hour, 6 hour and 24 hour.
* Data logging.
* Client for the https://radmon.org radiation monitoring website.
* 95% confidence intervals to ensure accurate readings.
* 95% confidence intervals for accurate readings.
* Overload alert.
* Configurable pulse click sounds: off, quiet, loud.
* Configurable backlight: off, pulse flashes, on for 10 seconds, on for 60 seconds, or always on.
* Configurable battery type for battery level monitoring.
* Configurable backlight: off, on for 10 seconds, on for 60 seconds, pulse flashes or always on.
* Configurable battery type for accurate battery level monitoring.
* Support for multiple Geiger-Müller tubes: HH614 (48 mm long), M4011 (105 mm long), SBM-20 (108 mm long), SI-3BG (50 mm long).
* Device statistics for monitoring usage and performance of the device.
* Life statistics for monitoring usage and performance of the device.
* True random number generator for generating secure passwords (letters & numbres, full ASCII), random hexadecimal and decimal numbers, coin flips and dice throws (6-sided, 4-sided, 8-sided, 12-sided and 20-sided).
* Up to 40% more battery life compared to the original firmware.
* Power-on self-test and safety watchdog.
* Unique and fun feature: Nuclear chess.
* Game: nuclear chess.

## Installation

Expand Down Expand Up @@ -60,12 +60,13 @@ Follow these steps to install Rad Pro firmware on your FS2011 radiation detector

![FS2011 circuit board](docs/img/fs2011-board.jpg)

If your board looks different, you may have a different hardware version. In such cases, this firmware may not function properly, especially if your board does not have an STM32 microprocessor. Please post an issue, including a photograph of your board (both sides).
If your board looks different, you may have a different hardware revision. In such cases, this firmware may not function properly. Please post an issue, including a photograph of your board (both sides).

* Solder the 4-pin header to XS1 on the board.
* Optionally, for easier access to XS1, use a file to extend the hole for the battery holder clip so that a 4-pin header connector can fit. Solder four cables approximately 15 cm long between XS1 and a 4-pin header. Using a glue gun, attach a 4-pin header to the back case, so you can access the header with the battery case open.
* Optionally, align the Geiger-Müller tube to the holes of the back case using a heat gun/glue gun if the tube is mounted vertically. Be careful, as the tube's glass is very delicate.
* Optionally, apply solder on the battery holder's pads so that low-profile AA batteries make good electrical contact.
* Optionally, increase the volume by drilling a hole on the back case in front of the buzzer.
* Optionally, increase the buzzer volume by drilling a hole on the back case in front of the buzzer.
* Optionally, add a female USB port and connect GND and +5V to the 0V and 5V pads of the electronics board. This modification will allow your FS2011 to run continuously and even charge Ni-MH batteries.
* Connect the ST-Link V2 device to XS1. The pins, from top to bottom, are:
* GND
Expand Down
2 changes: 1 addition & 1 deletion platform.io/src/display.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ struct
} display;

const char *const firmwareName = "Rad Pro";
const char *const firmwareVersion = "1.2.0";
const char *const firmwareVersion = "1.2.1";

#ifndef SDL_MODE
static uint8_t setupU8X8(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr);
Expand Down
4 changes: 1 addition & 3 deletions platform.io/src/events.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ struct

volatile int32_t backlightTimer;
volatile int32_t buzzerTimer;
volatile int32_t keyTimer;
int32_t keyTimer;

int32_t oneSecondTimer;
volatile uint8_t oneSecondUpdate;
Expand Down Expand Up @@ -156,8 +156,6 @@ void sleep(uint32_t value)
iwdg_reset();
}
#else
static uint32_t tickSim = 0;

if (!value)
return;

Expand Down
10 changes: 4 additions & 6 deletions platform.io/src/measurements.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@

#define OVERLOAD_RATE 1000

#define AVERAGE_TIME_MAX (UINT32_MAX / SYS_TICK_FREQUENCY)

#define ALARM_TICKS ((uint32_t)(0.25F * SYS_TICK_FREQUENCY))

UnitType units[] = {
Expand Down Expand Up @@ -235,7 +233,7 @@ void onMeasurementTick(uint32_t pulseCount)
}

// Average rate
if (averageRate.tick < AVERAGE_TIME_MAX)
if (averageRate.tick < UINT32_MAX)
{
if (!averageRate.pulseCount)
averageRate.firstPulseTick = averageRate.tick;
Expand Down Expand Up @@ -266,7 +264,7 @@ void onMeasurementTick(uint32_t pulseCount)
// Update ticks
instantaneousRate.tick++;

if (averageRate.tick < AVERAGE_TIME_MAX)
if (averageRate.tick < UINT32_MAX)
averageRate.tick++;
}

Expand Down Expand Up @@ -325,7 +323,7 @@ void onMeasurementOneSecond(void)
pulseCount = averageRate.pulseCount;
ticks = averageRate.lastPulseTick - averageRate.firstPulseTick;

if ((averageRate.tick < AVERAGE_TIME_MAX) && (averageRate.pulseCount < UINT32_MAX))
if ((averageRate.tick < UINT32_MAX) && (averageRate.pulseCount < UINT32_MAX))
averageRate.snapshotTime++;

if (ticks && (pulseCount > 1))
Expand Down Expand Up @@ -631,7 +629,7 @@ void drawAverageRateView(void)

if (averageRate.isHold)
drawSubtitle("HOLD");
else if ((averageRate.snapshotTime >= AVERAGE_TIME_MAX) ||
else if ((averageRate.tick >= UINT32_MAX) ||
(averageRate.snapshotPulseCount >= UINT32_MAX))
drawSubtitle("OVERFLOW");
else if (averageRate.snapshotValue >= OVERLOAD_RATE)
Expand Down
2 changes: 1 addition & 1 deletion tools/sign-firmware.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def getCRC(buffer, crc=0xffffffff):
# Variables
input_path = 'platform.io/.pio/build/fs2011/firmware.bin'
output_dir = 'tools/'
version = '1.2.0'
version = '1.2.1'

FLASH_SIZE = 0x10000
FIRMWARE_SIZE = 0xc000 - 4
Expand Down

0 comments on commit e0ba9cb

Please sign in to comment.