Add DSLogic capture, signal conversion and DSView decoders
This commit is contained in:
35
tools/dsview/gate-pair-checkbox.patch
Normal file
35
tools/dsview/gate-pair-checkbox.patch
Normal file
@@ -0,0 +1,35 @@
|
||||
--- a/DSView/pv/prop/binding/decoderoptions.cpp
|
||||
+++ b/DSView/pv/prop/binding/decoderoptions.cpp
|
||||
@@ -27,6 +27,7 @@
|
||||
|
||||
#include "../../data/decoderstack.h"
|
||||
#include "../../data/decode/decoder.h"
|
||||
+#include "../bool.h"
|
||||
#include "../double.h"
|
||||
#include "../enum.h"
|
||||
#include "../int.h"
|
||||
@@ -85,7 +86,23 @@
|
||||
|
||||
Property *prop = NULL;
|
||||
|
||||
- if (opt->values)
|
||||
+ if (strcmp(dec->id, "gate_driver_timing") == 0 &&
|
||||
+ strcmp(opt->id, "pair_analysis") == 0) {
|
||||
+ prop = new Bool(name, name,
|
||||
+ [getter]() -> GVariant* {
|
||||
+ GVariant *value = getter();
|
||||
+ const bool enabled = value && g_variant_get_int64(value) != 0;
|
||||
+ if (value) g_variant_unref(value);
|
||||
+ return g_variant_ref_sink(g_variant_new_boolean(enabled));
|
||||
+ },
|
||||
+ [setter](GVariant *value) {
|
||||
+ GVariant *number = g_variant_ref_sink(g_variant_new_int64(
|
||||
+ g_variant_get_boolean(value) ? 1 : 0));
|
||||
+ setter(number);
|
||||
+ g_variant_unref(number);
|
||||
+ });
|
||||
+ }
|
||||
+ else if (opt->values)
|
||||
prop = bind_enum(name, opt, getter, setter);
|
||||
else if (g_variant_is_of_type(opt->def, G_VARIANT_TYPE("d")))
|
||||
prop = new Double(name, name, 2, "",none, none, getter, setter);
|
||||
Reference in New Issue
Block a user