コード例 #1
0
ファイル: irq_debug.hpp プロジェクト: zenglongGH/px4esc
 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);
 }
コード例 #2
0
ファイル: irq_debug.hpp プロジェクト: zenglongGH/px4esc
 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;
 }
コード例 #3
0
ファイル: irq_debug.hpp プロジェクト: zenglongGH/px4esc
 void set(const Value x)
 {
     static_assert(Index < NumVariables, "Debug variable index out of range");
     vars_[Index] = Scalar(x);
 }
コード例 #4
0
ファイル: irq_debug.hpp プロジェクト: zenglongGH/px4esc
 static void setVariableFromIRQ(const unsigned index, const Value value)
 {
     auto& self = getInstance();
     self.vars_.at(index) = Scalar(value);
     self.update_flags_.at(index) = true;
 }