summaryrefslogtreecommitdiffstats
path: root/CAN-binder/low-can-binding
diff options
context:
space:
mode:
Diffstat (limited to 'CAN-binder/low-can-binding')
-rw-r--r--CAN-binder/low-can-binding/can/can-signals.cpp6
-rw-r--r--CAN-binder/low-can-binding/can/can-signals.hpp1
-rw-r--r--CAN-binder/low-can-binding/utils/timer.cpp5
-rw-r--r--CAN-binder/low-can-binding/utils/timer.hpp1
4 files changed, 13 insertions, 0 deletions
diff --git a/CAN-binder/low-can-binding/can/can-signals.cpp b/CAN-binder/low-can-binding/can/can-signals.cpp
index 260d5775..fe74115c 100644
--- a/CAN-binder/low-can-binding/can/can-signals.cpp
+++ b/CAN-binder/low-can-binding/can/can-signals.cpp
@@ -165,11 +165,17 @@ bool can_signal_t::get_received() const
{
return received_;
}
+
float can_signal_t::get_last_value() const
{
return last_value_;
}
+std::pair<float, uint64_t> can_signal_t::get_last_value_with_timestamp() const
+{
+ return std::make_pair(last_value_, frequency_.get_last_tick());
+}
+
void can_signal_t::set_parent(can_message_definition_t* parent)
{
parent_ = parent;
diff --git a/CAN-binder/low-can-binding/can/can-signals.hpp b/CAN-binder/low-can-binding/can/can-signals.hpp
index 2d67f273..d528f6a5 100644
--- a/CAN-binder/low-can-binding/can/can-signals.hpp
+++ b/CAN-binder/low-can-binding/can/can-signals.hpp
@@ -147,6 +147,7 @@ public:
SignalEncoder& get_encoder();
bool get_received() const;
float get_last_value() const;
+ std::pair<float, uint64_t> get_last_value_with_timestamp() const;
void set_parent(can_message_definition_t* parent);
void set_prefix(std::string val);
diff --git a/CAN-binder/low-can-binding/utils/timer.cpp b/CAN-binder/low-can-binding/utils/timer.cpp
index 4584b859..eb79f853 100644
--- a/CAN-binder/low-can-binding/utils/timer.cpp
+++ b/CAN-binder/low-can-binding/utils/timer.cpp
@@ -113,6 +113,11 @@ float frequency_clock_t::get_frequency() const
return frequency_;
}
+uint64_t frequency_clock_t::get_last_tick() const
+{
+ return last_tick_;
+}
+
/// @brief Force the clock to tick, regardless of it its time has actually
/// elapsed.
void frequency_clock_t::tick(uint64_t timestamp)
diff --git a/CAN-binder/low-can-binding/utils/timer.hpp b/CAN-binder/low-can-binding/utils/timer.hpp
index 560a8181..a667022a 100644
--- a/CAN-binder/low-can-binding/utils/timer.hpp
+++ b/CAN-binder/low-can-binding/utils/timer.hpp
@@ -53,5 +53,6 @@ public:
time_function_t get_time_function();
bool elapsed(bool stagger);
+ uint64_t get_last_tick() const;
void tick(uint64_t timestamp);
}; \ No newline at end of file
ground-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ }
SOC_FAMILY = "r8a7796"

# Mask graphic Pkgs
BBMASK = "gles-user-module|kernel-module-gles|wayland-kms|libgbm"
# Mask MMP recipes
BBMASK .= "|kernel-module-uvcs-drv|omx-user-module"

BBMASK .= "|meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-forward-port/"

DISTRO_FEATURES_append = " sota"
OSTREE_KERNEL = "Image"
IMAGE_BOOT_FILES_sota = "m3ulcb-ota-bootfiles/* Image-r8a7796-m3ulcb.dtb"
OSTREE_BOOTLOADER ?= "u-boot"