@@ -128,6 +128,15 @@ static void __on_scene_waveform_load(arm_2d_scene_t *ptScene)
128128
129129 waveform_view_on_load (& this .Waveform .tHelper );
130130
131+ /* disable dynamic dirty region optimization for Cortex-M0/M0+ */
132+ #if (defined(__ARM_ARCH ) && __ARM_ARCH_PROFILE == 'M' && (__ARM_ARCH_ISA_THUMB < 2 ))
133+
134+ this .bIsDirtyRegionOptimizationEnabled = !!
135+ arm_2d_helper_pfb_disable_dirty_region_optimization (
136+ & this .use_as__arm_2d_scene_t .ptPlayer -> use_as__arm_2d_helper_pfb_t );
137+
138+ #endif
139+
131140}
132141
133142static void __after_scene_waveform_switching (arm_2d_scene_t * ptScene )
@@ -230,7 +239,7 @@ static void __on_scene_waveform_frame_start(arm_2d_scene_t *ptScene)
230239 /* simulate a full battery charging/discharge cycle */
231240 arm_2d_helper_time_cos_slider (50 , 350 , 20000 , 0 , & nResult , & this .lTimestamp [0 ]);
232241
233- __generate_cos_samples (ptThis , 5 , (float )nResult / 100.0f );
242+ __generate_cos_samples (ptThis , 100 , (float )nResult / 100.0f );
234243
235244 } while (0 );
236245
@@ -255,6 +264,12 @@ static void __before_scene_waveform_switching_out(arm_2d_scene_t *ptScene)
255264 user_scene_waveform_t * ptThis = (user_scene_waveform_t * )ptScene ;
256265 ARM_2D_UNUSED (ptThis );
257266
267+ if (this .bIsDirtyRegionOptimizationEnabled ) {
268+ arm_2d_helper_pfb_enable_dirty_region_optimization (
269+ & this .use_as__arm_2d_scene_t .ptPlayer -> use_as__arm_2d_helper_pfb_t ,
270+ NULL ,
271+ 0 );
272+ }
258273}
259274
260275static
@@ -444,7 +459,7 @@ user_scene_waveform_t *__arm_2d_scene_waveform_init( arm_2d_scene_player_t *pt
444459 },
445460
446461 .u2SampleSize = WAVEFORM_SAMPLE_SIZE_HWORD ,
447- .u5DotHeight = 2 ,
462+ .u5DotHeight = 0 ,
448463 .bUnsigned = false,
449464
450465 .tBrushColour .tColour = GLCD_COLOR_NIXIE_TUBE ,
0 commit comments