diff --git a/examples/common/controls/spin_zoom_widget.c b/examples/common/controls/spin_zoom_widget.c index 44cc4bd0..17fb7775 100644 --- a/examples/common/controls/spin_zoom_widget.c +++ b/examples/common/controls/spin_zoom_widget.c @@ -147,6 +147,17 @@ ARM_NONNULL(1) void spin_zoom_widget_on_load( spin_zoom_widget_t *ptThis) { assert(NULL != ptThis); + + float fAngleStep = 0.05f; + float fScaleStep = 0.01f; + + if (this.tCFG.Indicator.Step.fAngle > 0.0f) { + fAngleStep = this.tCFG.Indicator.Step.fAngle; + } + + if (this.tCFG.Indicator.Step.fScale > 0.0f) { + fScaleStep = this.tCFG.Indicator.Step.fScale; + } if (NULL != this.tCFG.ptScene) { /* initialize transform helper */ @@ -154,8 +165,8 @@ void spin_zoom_widget_on_load( spin_zoom_widget_t *ptThis) &this.tHelper, &this.tCFG.ptScene->tDirtyRegionHelper, (arm_2d_op_t *)&this.OPCODE, - 0.05f, - 0.01f); + fAngleStep, + fScaleStep); } } diff --git a/examples/common/controls/spin_zoom_widget.h b/examples/common/controls/spin_zoom_widget.h index e948d183..c36a6b0f 100644 --- a/examples/common/controls/spin_zoom_widget.h +++ b/examples/common/controls/spin_zoom_widget.h @@ -87,6 +87,11 @@ typedef struct spin_zoom_widget_cfg_t { float fAngleInDegree; int32_t nValue; } UpperLimit; + + struct { + float fAngle; + float fScale; + } Step; } Indicator; //arm_2d_helper_pi_slider_cfg_t tPISliderCFG; diff --git a/examples/common/scenes/watch/arm_2d_scene_watch.c b/examples/common/scenes/watch/arm_2d_scene_watch.c index e1c3b510..b962c903 100644 --- a/examples/common/scenes/watch/arm_2d_scene_watch.c +++ b/examples/common/scenes/watch/arm_2d_scene_watch.c @@ -217,8 +217,6 @@ static void __on_scene_watch_frame_start(arm_2d_scene_t *ptScene) /* calculate the Ten-Miliseconds */ do { this.chMs = lTimeStampInMs; - - } while(0); } @@ -230,7 +228,7 @@ static void __on_scene_watch_frame_complete(arm_2d_scene_t *ptScene) /* switch to next scene after 3s */ if (arm_2d_helper_is_time_out(10000, &this.lTimestamp[0])) { - arm_2d_scene_player_switch_to_next_scene(ptScene->ptPlayer); + //arm_2d_scene_player_switch_to_next_scene(ptScene->ptPlayer); } } @@ -388,6 +386,9 @@ user_scene_watch_t *__arm_2d_scene_watch_init( arm_2d_scene_player_t *ptDispAd .fAngleInDegree = 360.0f, .nValue = 60*1000ul, }, + .Step = { + .fAngle = 0.0f, //! 0.0f means very smooth, 1.0f looks like mech watch, 6.0f looks like wall clock + }, }, .ptTransformMode = &SPIN_ZOOM_MODE_FILL_COLOUR, .Source = { @@ -415,6 +416,9 @@ user_scene_watch_t *__arm_2d_scene_watch_init( arm_2d_scene_player_t *ptDispAd .fAngleInDegree = 360.0f, .nValue = 3600, }, + .Step = { + .fAngle = 1.0f, + }, }, .ptTransformMode = &SPIN_ZOOM_MODE_FILL_COLOUR, .Source = {