Skip to content

in ThreadController.cpp #1

Closed
Closed

Description

@patrickelectric

Thread::Thread() have a problem to Arduino
can be solved with only "Thread();"
line 8

Activity

  1. ivanseidel commented on Feb 8, 2014

    @ivanseidel
    Owner

    Can you post the code and the error generated? Thread::Thread(); should call Thread's constructor inside ThreadController, inherited from Thread in order to keep things working.

  2. patrickelectric commented on Feb 8, 2014

    @patrickelectric
    Author
    ThreadController.cpp: In constructor 'ThreadController::ThreadController(long int)':
    ThreadController.cpp:8:17: error: cannot call constructor 'ThreadController::Thread' directly [-fpermissive]
    ThreadController.cpp:8:17: error:   for a function-style cast, remove the redundant '::Thread' [-fpermissive]
    

    I just compile SimplreThread

  3. ivanseidel commented on Feb 8, 2014

    @ivanseidel
    Owner

    That's really weird. What version of Arduino and what targeting Platform?

  4. patrickelectric commented on Feb 8, 2014

    @patrickelectric
    Author

    Arduino 1:1.05+dfsg2-1
    avr-g++ (GCC) 4.7.2
    nano328

  5. ivanseidel commented on Feb 8, 2014

    @ivanseidel
    Owner

    Please @patrickelectric , Change to this and test if everything works. I cannot simulate your error here.

    ThreadController::ThreadController(long _interval): Thread(){
        cached_size = 0;
    
        clear();
        setInterval(_interval);
    
        #ifdef USE_THREAD_NAMES
            // Overrides name
            ThreadName = "ThreadController ";
            ThreadName = ThreadName + ThreadID;
        #endif
    }
    
  6. patrickelectric commented on Feb 8, 2014

    @patrickelectric
    Author

    ty @ivanseidel
    this solved my problem.

  7. ivanseidel commented on Feb 8, 2014

    @ivanseidel
    Owner

    Please @patrickelectric , clone the repository egain, I have pushed to master the hot-fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions