-
Notifications
You must be signed in to change notification settings - Fork 6
Adding Your Own Meter
Users can also add their own meters to PeppyMeter. The 'Meter Anatomy' chapter shows how meters are constructed and which configuration settings are responsible for the particular part of the meter. It's highly recommended to read that chapter before making any custom meter.
The following tasks should be completed in order to create custom meter:
- Choose Meter Type.
- Prepare Images.
- Configure Meter.
- Tuning.
The first step is to decide which meter you'd like to add to PeppyMeter. All meter types were described in the corresponding chapter.
Next step is to prepare all necessary images. This step usually takes the most time. All images should be placed in one of the image folders. The program supports three image resolutions: 320x240, 480x320 and 800x480. Depending on the resolution the images should be placed in the particular folder: images in the resolution 320x240 should be placed in the folder small, 480x320 images in the folder medium and 800x480 in the folder large.
It's highly recommended to analyze the images for one of the default meters before creating your own. The indicator and foreground images have transparent and semi-transparent areas. The foreground image is optional. Some meters don't use it.
This step assumes adding the definition of new meter to the configuration file meters.txt. The best way to learn how to do that is to analyze the configuration of one of the existing default meters. The chapter Meter Anatomy explains the meaning of all configuration settings.
To adjust start/stop positions of the linear meter indicators or circular meter needles it's recommended to use data sources other than the default pipe data source. For example to adjust the initial/start angle and x/y coordinates of the needle the data source can be set to the constant and volume level set to 0 in the meters.txt file:
[data.source]
type = constant
...
volume.constant = 0
To adjust the stop angle the value can be changed to 100:
[data.source]
type = constant
...
volume.constant = 100
Before switching to the default data source 'pipe' it's recommended to check the animation speed. It can vary depending on the CPU and other resources of the machine where PeppyMeter is running. To check the animation speed the 'noise' data source can be used:
[data.source]
type = noise
To modify the animation speed two parameters can be changed - 'ui.refresh.period' and 'steps.per.degree'. The minimum value for the later is 1. The minimum value for the former is 0.001 (1 millisecond).