tuning constants - rowr111/cubegarden GitHub Wiki
Real world conditions may vary and cause effects to either be triggered too easily, not easily enough, or have a non-beautiful result.
Therefore, there are constants we can modify from the master badge in order to adjust all the cubes at once to have more pleasing settings.
Currently modifiable from the master badge, "A" key will transmit the selected setting, "B" key transmits all available settings:
- cfg_dBbkgd
- amount in dB used as the low threshold for dB effects
- userconfig files
- 50 is default
- UI: 'Tune Cubes', app-tune.c
- cfg_dBmax
- amount in dB used as the high threshold for dB effects
- userconfig files
- 90 is default
- UI: 'Tune Cubes', app-tune.c
- cfg_pressuretrig
- amount in mPa use to trigger an indication that pressure has changed suddenly
- userconfig files
- 60 mPa is default
- UI: 'Tune Cubes', app-tune.c
- cfg_bright_thresh
- first battery level brightness threshold after which dimming will be forced by 1 shift
- 3750 is default
- userconfig files
- UI: 'settings', app-rad.c
- cfg_bright_thresh2
- second battery level brightness threshold after which dimming will be forced by 2 shift
- 3650 is default
- UI: 'settings', app-rad.c
- cfg_bright_thresh3
- third battery level brightness threshold after which dimming will be forced by 3 shift
- 3550 is default
- userconfig files
- UI: 'settings', app-rad.c
- cfg_autoadv
- time in minutes after which the pattern will be advanced to the next persistent pattern (as per master badge duration settings on each )
- 0 = do not auto advance, manual mode
- 0 is default
- userconfig files (ONLY ON MASTER BADGE)
- UI: 'settings', app-rad.c
- cfg_nofun
- turn "NO FUN MODE" on and off
- UI: 'Tune Cubes', app-tune.c
- cfg_timesync_interval
- frequency of timing ping
- orchard-app.c line 658 (MASTER BADGE ONLY)
- UI: 'Tune Cubes', app-tune.c, defaults to 30, range 1-120
- cfg_fx_newcube_time
- base time delay for users to discover "new" masters (e.g. baton passes through flashing) in interactive effects
- UI: 'Tune Cubes', app-tune.c
- 4 seconds is the default
Other modifiable constants:
- REQUIRED_CUBE_PARTICIPATION
- led.c (master badge ONLY)
- determines how many cubes need to be double tapped DOUBLETAP_HISTORY times in order to trigger the special doubletap effect
- (the special effect can be triggered at any time on any effect)
- 5 (will be) default
- CUBE_PARTICIPATION_EXPIRATION
- led.c (master badge ONLY)
- determines how long (ms) to keep cube participation in the special effect trigger in history
- 10000 is default
- EFFECT_SEND_DUP
- led.h (master badge ONLY)
- number of times to resend effect for effect auto advance
- 5 is default
- EFFECT_SEND_DUP_DELAY
- led.h (master cube ONLY)
- delay between sending effect retries for effect auto advance
- 27 is default
- cube_layout
- led.c
- determines cube layout for the layout offset (used in a few patterns like dropbounce and rainbowblast)
- 1 is default (donut/semicircle pattern) (2 = rows of 10 cubes, 3 = rows of 5 cubes)
- cube_count
- led.c
- number of cubes when determining layout (used in a few patterns like dropbounce and rainbowblast)
- 50 is default
- TODO: update this to use whatever the cube count is and not hard code it
- numOfBaseHsvColors
- led.c
- number of colors to use when generating colors for confetti pulse (wanted it to limit to a set number of colors)
- 8 is default
- TIME_PING_MAX_WAIT
- led.h
- ms that a cube will wait before forcing safety mode (theft deterrent)
- 180000 is default
- baton related constants in baton.h:
- MAX_ACTUAL_CUBES
- 50 (will be) default
- BATON_PASS_WAIT 200 // how long to wait in ms during a baton pass to sample responses
- BATON_HOLDER_INTERVAL 2000 // time between baton holder broadcast pings
- BATON_RADIO_ACK_DUP 3 // define how many times packets are resent by default
- BATON_RADIO_ACK_DUP_DELAY 27 // time in milliseconds to wait between resending dups
- MAX_ACTUAL_CUBES
- trigger related constants in trigger.c:
- BUMP_DEBOUNCE 300 // 300ms debounce to next bump
- PRESSURE_DEBOUNCE 300 // 300ms debounce to next pressure change event
- SINGLETAP_DEBOUNCE 300 // 300ms debounce to next singletap
- DOUBLETAP_DEBOUNCE 300 // 300ms debounce to next doubletap
- DOUBLETAP_HISTORY 10 // number of times you have to double tap to send the doubletap trigger
- BARO_HISTORY
- 32 is default
- barometer.h
- number of readings use to determine the current avg barometric pressure
- tap and double-tap sensitivity (gyro)
- LSM6DS3_TAP_THRESHOLD_MID_LOW is default
- gyro.h