交错中性光低亮PDM脉冲
This commit is contained in:
@@ -277,6 +277,15 @@ __RAM_CODE void Bridge_Deadtime_Expired(void)
|
||||
(!frame_pdm_enabled ||
|
||||
frame_pdm_threshold != pdm_threshold)) {
|
||||
pdm_w_accumulator = pdm_threshold - w_step;
|
||||
/*
|
||||
* A 50:50 neutral target gives W and C identical PDM steps.
|
||||
* Start C half a density cycle away from W so their optical
|
||||
* pulses are spread across different frames instead of arriving
|
||||
* as one bright pair followed by a long dark gap.
|
||||
*/
|
||||
if (pdm_threshold == BRIDGE_NEUTRAL_PDM_THRESHOLD)
|
||||
pdm_c_accumulator = pdm_threshold / 2U;
|
||||
else
|
||||
pdm_c_accumulator = pdm_threshold - c_step;
|
||||
}
|
||||
frame_pdm_enabled = pdm_enabled;
|
||||
|
||||
Reference in New Issue
Block a user