Esempio n. 1
0
 Scalar getAbsoluteTimeInSeconds() const
 {
     // This is super wonky, should be improved someday
     const auto delta = chVTTimeElapsedSinceX(previous_time_systicks_);
     previous_time_systicks_ += delta;
     absolute_time_systicks_ += delta;
     return Scalar(absolute_time_systicks_) / Scalar(CH_CFG_ST_FREQUENCY);
 }
Esempio n. 2
0
 static void setVariableFromIRQ(const Value value)
 {
     static_assert(Index < NumVariables, "Index out of range");
     auto& self = getInstance();
     self.vars_[Index] = Scalar(value);
     self.update_flags_[Index] = true;
 }
Esempio n. 3
0
 void set(const Value x)
 {
     static_assert(Index < NumVariables, "Debug variable index out of range");
     vars_[Index] = Scalar(x);
 }
Esempio n. 4
0
 static void setVariableFromIRQ(const unsigned index, const Value value)
 {
     auto& self = getInstance();
     self.vars_.at(index) = Scalar(value);
     self.update_flags_.at(index) = true;
 }