Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Ticker.h - Too-large timeouts should generate an error, not silently fail (was: big float and unt32_t numbers) #8066

Closed
@enjoyneering

Description

@enjoyneering

Platform

  • Hardware:[ESP-12]
  • Core Version:[2.7.4] & [3.0.0]
  • Development Env:[Arduino IDE]
  • Operating System:[Windows]

Settings in IDE

  • Module: [Generic ESP8266]
  • Flash Mode:[qio]
  • Flash Size: [4MB]
  • lwip Variant: [v2 Higher Bandwidth]
  • Reset Method:[nodemcu]
  • Flash Frequency:[80Mhz]
  • CPU Frequency:[80Mhz]
  • Upload Using:[OTA|SERIAL]
  • Upload Speed: [115200]

Problem Description

Any Ticker tasks fire OK if time is short (tested up to 60 seconds (60 000ms)). However, when I try to control the brightness after sunset, the time gets big (for example 44944 sec (44 944 000ms)) & the same task no longer start. The code below is not exactly what I have in my project, but close.

MCVE Sketch

#include<Arduino.h>#include<Ticker.h>Ticker ticker_autoBrightness;uint32_t timeSec =44079;//12h:14m:39svoidsetup() {pinMode(2, OUTPUT);task_clockDayBrightness();}voidloop() {//empty}voidtask_clockDayBrightness(){digitalWrite(2, LOW);//turn LED on  ticker_autoBrightness.once_scheduled(timeSec, task_clockNightBrightness);}voidtask_clockNightBrightness(){digitalWrite(2, HIGH);//turn LED off  ticker_autoBrightness.once_scheduled(timeSec, task_clockDayBrightness);}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp