message
stringlengths 6
474
| diff
stringlengths 8
5.22k
|
|---|---|
fix pnp telemetry test name
|
@@ -366,5 +366,5 @@ int test_iot_pnp_telemetry()
cmocka_unit_test(
test_az_iot_pnp_client_telemetry_publish_topic_get_content_type_and_encoding_with_small_buffer_fails),
};
- return cmocka_run_group_tests_name("az_iot_pnp_client", tests, NULL, NULL);
+ return cmocka_run_group_tests_name("az_iot_pnp_client_telemetry", tests, NULL, NULL);
}
|
Cascading: Fix side effect of Shell Recorder test
|
@@ -23,6 +23,9 @@ With the default Elektra installation only an administrator can update configura
```sh
# Backup-and-Restore:/sw/tutorial
+# Backup old override specification
+kdb export system/overrides dump > /tmp/overrides.dump
+
kdb get /sw/tutorial/cascading/#0/current/test
# RET: 1
# STDERR: Did not find key
@@ -154,7 +157,9 @@ As last part in this tutorial we remove the modifications to the database we mad
```sh
kdb rm -r user/sw/tutorial/
kdb rm -r system/sw/tutorial
-kdb rm -r system/overrides/test
+kdb rm -r system/overrides
+kdb import system/overrides dump < /tmp/overrides.dump
+rm /tmp/overrides.dump
kdb rm /overrides/test
|
Windows: BUFR encoding (no need to #define 'round')
|
@@ -236,10 +236,6 @@ static void init_class(grib_accessor_class* c)
#define OVERRIDDEN_REFERENCE_VALUES_KEY "inputOverriddenReferenceValues"
-#ifdef ECCODES_ON_WINDOWS
-#define round(a) ( (a) >=0 ? ((a)+0.5) : ((a)-0.5) )
-#endif
-
/* Set the error code, if it is bad and we should fail (default case), return */
/* variable 'err' is assumed to be pointer to int */
/* If BUFRDC mode is enabled, then we tolerate problems like wrong data section length */
|
Fix jpm on windows with multiple git binaries.
|
@@ -688,7 +688,7 @@ int main(int argc, const char **argv) {
(if stored-git-path (break stored-git-path))
(set stored-git-path
(if is-win
- (or (os/getenv "JANET_GIT") (pslurp "where git"))
+ (or (os/getenv "JANET_GIT") (first (string/split "\n" (pslurp "where git"))))
(os/getenv "JANET_GIT" "git"))))
(defn uninstall
|
Don't use cross-compile GCC on 32-bit systems
If the OS is not aarch64, then use the normal GCC. This allows
compilation for work on devices like the RK3399 when running in a 32-bit
chroot, instead of using a multilib setup.
|
@@ -51,7 +51,13 @@ else()
set(PYTHON_EXECUTABLE ${Python3_EXECUTABLE} CACHE INTERNAL "The Python3 executable" FORCE)
endif()
-if(RK3399 OR RPI4ARM64 OR PHYTIUM OR SD845 OR A64)
+cmake_host_system_information(RESULT CMAKE_HOST_SYSTEM_PROCESSOR QUERY OS_PLATFORM)
+string(COMPARE EQUAL "${CMAKE_HOST_SYSTEM_PROCESSOR}" "i686" _x86)
+string(COMPARE EQUAL "${CMAKE_HOST_SYSTEM_PROCESSOR}" "x86_64" _x86_64)
+string(COMPARE EQUAL "${CMAKE_HOST_SYSTEM_PROCESSOR}" "aarch64" _aarch64)
+string(COMPARE EQUAL "${CMAKE_HOST_SYSTEM_PROCESSOR}" "armhf" _armhf)
+
+if(_aarch64 AND (RK3399 OR RPI4ARM64 OR PHYTIUM OR SD845 OR A64))
set(CMAKE_C_COMPILER arm-linux-gnueabihf-gcc)
#set(CMAKE_ASM_COMPILER arm-linux-gnueabihf-as) #will use gcc in fact
set(CMAKE_C_COMPILER_TARGET arm-linux-gnueabihf)
@@ -593,11 +599,6 @@ else()
endif()
endif()
-string(COMPARE EQUAL "${CMAKE_HOST_SYSTEM_PROCESSOR}" "i686" _x86)
-string(COMPARE EQUAL "${CMAKE_HOST_SYSTEM_PROCESSOR}" "x86_64" _x86_64)
-string(COMPARE EQUAL "${CMAKE_HOST_SYSTEM_PROCESSOR}" "aarch64" _aarch64)
-string(COMPARE EQUAL "${CMAKE_HOST_SYSTEM_PROCESSOR}" "armhf" _armhf)
-
if(NOT _x86 AND NOT _x86_64)
install(TARGETS ${BOX86}
RUNTIME DESTINATION bin)
|
run_device_test: Fix implicit concat warning
BRANCH=none
TEST=none
Code-Coverage: Zoss
|
@@ -715,7 +715,7 @@ def flash_and_run_test(
patch_image(test, image_path)
except Exception as exception: # pylint: disable=broad-except
logging.warning(
- "An exception occurred while patching " "image: %s", exception
+ "An exception occurred while patching image: %s", exception
)
return False
|
printer_tree BUGFIX lysc_ext.plugin can be NULL
|
@@ -3795,7 +3795,7 @@ trb_ext_iter_next(ly_bool lysc_tree, void *exts, uint64_t *i)
if (lysc_tree) {
ce = exts;
while (*i < LY_ARRAY_COUNT(ce)) {
- if (trp_ext_parent_is_valid(1, &ce[*i])) {
+ if (ce->def->plugin && trp_ext_parent_is_valid(1, &ce[*i])) {
ext = &ce[*i];
break;
}
|
fix osrparser when replay too short
|
@@ -20,7 +20,7 @@ def setupReplay(osrfile, beatmap):
total_time = 0
start_index = 0
- start_osr = max(0, start_time - 3000)
+ start_osr = start_time - 3000
for index in range(len(replay_data)):
times = replay_info.play_data[index].time_since_previous_action
@@ -42,6 +42,7 @@ def setupReplay(osrfile, beatmap):
replay_data = replay_data[start_index:-1]
replay_data.sort(key=lambda x: x[TIMES]) # sort replay data based on time
+
start_time = replay_data[0][TIMES]
for x in range(10):
|
Create PytoUI views from UIKit views
|
@@ -2751,6 +2751,38 @@ class View:
self.__py_view__.buttonItems = items
+class UIKitView(View):
+ """
+ This class is used to create a PytoUI view from an UIKit view. This class must be subclassed and implement :meth:`~pyto_ui.UIKitView.make_view`.
+ """
+
+ def __init__(self):
+
+ if type(self) is UIKitView:
+ msg = "'UIKitView' must be subclassed and implement 'make_view()'."
+ raise NotImplementedError(msg)
+
+ self._made_view = False
+ self._make_view()
+ while self.__py_view__ is None:
+ continue
+
+ def make_view(self) -> "UIView":
+ """
+ Implement this method to return an UIKit View. This method is automatically called on the main thread.
+
+ :rtype: UIView
+ """
+
+ return None
+
+ @mainthread
+ def _make_view(self):
+ view = self.make_view()
+ py_view = __PyUIKitView__.alloc().initWithManaged(view)
+ self.__py_view__ = py_view
+
+
class ImageView(View):
"""
A view displaying an image. The displayed image can be a ``PIL`` image, an ``UIKit`` ``UIImage`` (see :func:`~pyto_ui.image_with_system_name`) or can be directly downloaded from an URL.
|
Fix uac2_headset include hassle be declaring value by hand
|
@@ -94,7 +94,7 @@ extern "C" {
#define CFG_TUD_AUDIO_IN_PATH (CFG_TUD_AUDIO)
#define CFG_TUD_AUDIO_OUT_PATH (CFG_TUD_AUDIO)
-#define CFG_TUD_AUDIO_FUNC_1_DESC_LEN TUD_AUDIO_HEADSET_STEREO_DESC_LEN
+#define CFG_TUD_AUDIO_FUNC_1_DESC_LEN 220 // This equals TUD_AUDIO_HEADSET_STEREO_DESC_LEN, however, including it from usb_descriptors.h is not possible due to some strange include hassle
// Audio format type I specifications
#define CFG_TUD_AUDIO_FUNC_1_N_CHANNELS_TX 1
|
Mark args as unused in now and nowUTC
|
#include "datetime.h"
static Value nowNative(VM *vm, int argCount, Value *args) {
+ UNUSED(args);
+
if (argCount != 0) {
runtimeError(vm, "now() takes no arguments (%d given)", argCount);
return EMPTY_VAL;
@@ -18,6 +20,8 @@ static Value nowNative(VM *vm, int argCount, Value *args) {
}
static Value nowUTCNative(VM *vm, int argCount, Value *args) {
+ UNUSED(args);
+
if (argCount != 0) {
runtimeError(vm, "nowUTC() takes no arguments (%d given)", argCount);
return EMPTY_VAL;
|
Fix assertion failure when writing Handshake before getting its tx key
|
@@ -8535,8 +8535,9 @@ ngtcp2_ssize ngtcp2_conn_write_connection_close(ngtcp2_conn *conn,
return NGTCP2_ERR_INVALID_STATE;
}
- if (!(conn->flags & NGTCP2_CONN_FLAG_HANDSHAKE_CONFIRMED)) {
- if (pkt_type != NGTCP2_PKT_INITIAL && in_pktns && conn->server) {
+ if (!(conn->flags & NGTCP2_CONN_FLAG_HANDSHAKE_CONFIRMED) &&
+ pkt_type != NGTCP2_PKT_INITIAL) {
+ if (in_pktns && conn->server) {
nwrite = ngtcp2_conn_write_single_frame_pkt(
conn, dest, destlen, NGTCP2_PKT_INITIAL, &conn->dcid.current.cid, &fr,
NGTCP2_RTB_FLAG_NONE, ts);
@@ -8549,7 +8550,8 @@ ngtcp2_ssize ngtcp2_conn_write_connection_close(ngtcp2_conn *conn,
res += nwrite;
}
- if (pkt_type != NGTCP2_PKT_HANDSHAKE && hs_pktns) {
+ if (pkt_type != NGTCP2_PKT_HANDSHAKE && hs_pktns &&
+ hs_pktns->crypto.tx.ckm) {
nwrite = ngtcp2_conn_write_single_frame_pkt(
conn, dest, destlen, NGTCP2_PKT_HANDSHAKE, &conn->dcid.current.cid,
&fr, NGTCP2_RTB_FLAG_NONE, ts);
|
Make new_pipe ipc argument default to false
|
@@ -26,8 +26,11 @@ static int luv_new_pipe(lua_State* L) {
uv_pipe_t* handle;
int ipc, ret;
luv_ctx_t* ctx = luv_context(L);
- luaL_checktype(L, 1, LUA_TBOOLEAN);
+ if (lua_isboolean(L, 1)) {
ipc = lua_toboolean(L, 1);
+ } else {
+ luaL_argcheck(L, lua_isnoneornil(L, 1), 1, "Expected boolean or nil");
+ }
handle = (uv_pipe_t*)luv_newuserdata(L, sizeof(*handle));
ret = uv_pipe_init(ctx->loop, handle, ipc);
if (ret < 0) {
|
just support the sequenct reset the last value in gpdb5
because the behivor of pg_dump is different between gpdb 4 and gpdb 5
so the check_sequence function only can work on gpdb 5
|
@@ -1362,6 +1362,7 @@ Feature: gptransfer tests
Then gptransfer should return a return code of 0
And gptransfer should print "Validation of gptest.public.heap_employee successful" to stdout
+ @skip_source_43
Scenario: gptransfer table that includes implicit sequence
Given the gptransfer test is initialized
And the user runs "dropdb -U $GPTRANSFER_SOURCE_USER -p $GPTRANSFER_SOURCE_PORT -h $GPTRANSFER_SOURCE_HOST gptransfer_testdb6"
@@ -1373,6 +1374,7 @@ Feature: gptransfer tests
And verify that table "test_sequence" in "gptransfer_testdb6" has "100" rows
And verify that sequence "test_sequence_id_seq" last value is "101" in database "gptransfer_testdb6"
+ @skip_source_43
Scenario: gptransfer table that includes implicit sequence with -t option
Given the gptransfer test is initialized
And the user runs "dropdb -U $GPTRANSFER_SOURCE_USER -p $GPTRANSFER_SOURCE_PORT -h $GPTRANSFER_SOURCE_HOST gptransfer_testdb6"
|
added additional information why init could take some time
|
@@ -9335,7 +9335,7 @@ if((eapreqflag == true) && ((attackstatus &DISABLE_CLIENT_ATTACKS) == DISABLE_CL
exit(EXIT_FAILURE);
}
-fprintf(stdout, "initialization of %s %s (this may take some time)...\n", basename(argv[0]), VERSION_TAG);
+fprintf(stdout, "initialization of %s %s (depending on the capabilities of the device, this may take some time)...\n", basename(argv[0]), VERSION_TAG);
if(phyinterfacename[0] != 0)
{
if(isinterfaceshared() == true) fprintf(stderr, "\nwarning: interface %s (%s) is shared\nhcxdumptool may not work as expected on shared physical devices\n\n", interfacename, phyinterfacename);
|
lua: add another test for hslua_arith
|
@@ -57,6 +57,13 @@ tests = testGroup "ersatz"
peek status
result <- lua_tointegerx l top nullPtr
return (stts, result)
+ , "sets error status on error" =: do
+ LUA_ERRRUN `shouldBeResultOf` \l -> do
+ lua_pushinteger l 2
+ lua_pushboolean l TRUE
+ alloca $ \status -> do
+ hslua_arith l LUA_OPSHR status
+ peek status
, "runs metamethod" =: do
(LUA_OK, 7) `shouldBeResultOf` \l -> do
lua_pushinteger l 2
|
OcConsoleLib: Rework SanitiseClearScreen
|
@@ -134,7 +134,10 @@ ControlledClearScreen (
{
EFI_STATUS Status;
EFI_GRAPHICS_OUTPUT_PROTOCOL *GraphicsOutput;
- UINT32 Mode;
+ UINT32 Width;
+ UINT32 Height;
+ UINTN SizeOfInfo;
+ EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *Info;
Status = gBS->HandleProtocol (
gST->ConsoleOutHandle,
@@ -143,23 +146,61 @@ ControlledClearScreen (
);
if (!EFI_ERROR (Status)) {
- Mode = GraphicsOutput->Mode->Mode;
+ Status = GraphicsOutput->QueryMode (
+ GraphicsOutput,
+ GraphicsOutput->Mode->Mode,
+ &SizeOfInfo,
+ &Info
+ );
+ if (!EFI_ERROR (Status)) {
+ Width = Info->HorizontalResolution;
+ Height = Info->VerticalResolution;
+ FreePool (Info);
+ } else {
+ GraphicsOutput = NULL;
+ }
} else {
GraphicsOutput = NULL;
}
//
// On APTIO V with large resolution (e.g. 2K or 4K) ClearScreen
- // invocation resets resolution to 1024x768. We restore it here.
- // This is probably the safest approach. Other ways include:
- // - Change SetMode function to some No-op in GOP.
- // - Cleanup the screen manually.
- // None of these are tested as I am tired and do not want to risk.
+ // invocation resets resolution to 1024x768. To avoid the glitches
+ // we clear the screen manually, doing with other methods results
+ // in screen flashes and other problems.
//
- Status = mOriginalClearScreen (This);
if (GraphicsOutput != NULL) {
- GraphicsOutput->SetMode (GraphicsOutput, Mode);
+ STATIC EFI_GRAPHICS_OUTPUT_BLT_PIXEL mGraphicsEfiColors[8] = {
+ //
+ // B G R reserved
+ //
+ {0x00, 0x00, 0x00, 0x00}, // BLACK
+ {0x98, 0x00, 0x00, 0x00}, // LIGHTBLUE
+ {0x00, 0x98, 0x00, 0x00}, // LIGHGREEN
+ {0x98, 0x98, 0x00, 0x00}, // LIGHCYAN
+ {0x00, 0x00, 0x98, 0x00}, // LIGHRED
+ {0x98, 0x00, 0x98, 0x00}, // MAGENTA
+ {0x00, 0x98, 0x98, 0x00}, // BROWN
+ {0x98, 0x98, 0x98, 0x00}, // LIGHTGRAY
+ };
+
+ Status = GraphicsOutput->Blt (
+ GraphicsOutput,
+ &mGraphicsEfiColors[BitFieldRead32 ((UINT32) This->Mode->Attribute, 4, 6)],
+ EfiBltVideoFill,
+ 0,
+ 0,
+ 0,
+ 0,
+ Width,
+ Height,
+ 0
+ );
+
+ This->SetCursorPosition (This, 0, 0);
+ } else {
+ Status = mOriginalClearScreen (This);
}
return Status;
|
Correcting the folder name metadata for cmake metadata
|
@@ -84,8 +84,12 @@ function(afr_set_metadata arg_metadata_type arg_metadata_name arg_metadata_val)
set(metadata_file "${AFR_METADATA_OUTPUT_DIR}/console/${arg_metadata_type}.txt")
if(AFR_METADATA_MODE)
if("${cmake_file_name}" STREQUAL "CMakeLists.txt")
+ if (NOT "${AFR_CURRENT_MODULE}" STREQUAL "")
string(REPLACE "demo_" "" AFR_CURRENT_MODULE "${AFR_CURRENT_MODULE}")
file(APPEND "${metadata_file}" "${AFR_CURRENT_MODULE}###${arg_metadata_name}:::${arg_metadata_val}\n")
+ else()
+ file(APPEND "${metadata_file}" "${cmake_file_dir}###${arg_metadata_name}:::${arg_metadata_val}\n")
+ endif()
else()
file(APPEND "${metadata_file}" "${cmake_file_name}###${arg_metadata_name}:::${arg_metadata_val}\n")
endif()
|
Disable inconsistent nat attack test
|
@@ -126,7 +126,10 @@ static const picoquic_test_def_t test_table[] = {
{ "excess_repeat", excess_repeat_test },
{ "netperf_basic", netperf_basic_test },
{ "netperf_bbr", netperf_bbr_test },
+#if 0
+ /* test disabled because the results are not consistent. */
{ "nat_attack", nat_attack_test },
+#endif
{ "sockets", socket_test },
{ "socket_ecn", socket_ecn_test },
{ "ticket_store", ticket_store_test },
@@ -202,7 +205,7 @@ static const picoquic_test_def_t test_table[] = {
{ "qlog_trace_auto", qlog_trace_auto_test },
{ "qlog_trace_only", qlog_trace_only_test },
{ "qlog_trace_ecn", qlog_trace_ecn_test },
- { "nat_rebiding_stress", rebinding_stress_test },
+ { "nat_rebinding_stress", rebinding_stress_test },
{ "ready_to_send", ready_to_send_test },
{ "cubic", cubic_test },
{ "cubic_jitter", cubic_jitter_test },
|
fixed WhitelistPluginTests after rebase
|
@@ -21,12 +21,12 @@ public class WhitelistPluginTests
@Before public void setup ()
{
plugin = new WhitelistPlugin ();
- plugin.open (plugin.getConfig (), Key.createNameless ());
+ plugin.open (plugin.getConfig (), Key.create ());
}
@After public void tearDown ()
{
- plugin.close (Key.createNameless ());
+ plugin.close (Key.create ());
}
@Test public void test_getJniModuleContractRoot_shouldPass () throws KDBException
@@ -46,14 +46,14 @@ public class WhitelistPluginTests
@Test public void test_get_shouldPass () throws KDBException
{
- int result = plugin.get (KeySet.create (), Key.createNameless ());
+ int result = plugin.get (KeySet.create (), Key.create ());
assertEquals (Plugin.STATUS_NO_UPDATE, result);
}
@Test public void test_setInvalid_shouldPass () throws KDBException
{
- var parentKey = Key.createNameless ();
+ var parentKey = Key.create ();
var key = addSpecMetaData (Key.create ("user:/test")).setString ("not-allowed");
int result = plugin.set (KeySet.create (key), parentKey);
var errorNumber = parentKey.getMeta ("error/number").map (Key::getString).orElseThrow ();
@@ -64,7 +64,7 @@ public class WhitelistPluginTests
@Test public void test_setValid_shouldPass () throws KDBException
{
- var parentKey = Key.createNameless ();
+ var parentKey = Key.create ();
Key key;
int result;
key = addSpecMetaData (Key.create ("user:/test")).setString ("allowed0");
|
Deprecate reaper task
|
@@ -61,22 +61,8 @@ static void setup_fds(task_t* task) { task->files = array_m_create(MAX_FILES);
// array_m_insert(task->files, stderr_read);
}
-static void kill(task_t* task) {
- if (!tasking_installed()) return;
-
- //TODO only go back to terminal mode if task we're killing changed gfx mode
- //instead of hard coding these
- printk("_kill() checking if need to change gfx mode for task %s\n", task->name);
- if (!strcmp(task->name, "xserv") || !strcmp(task->name, "rexle")) {
- printk("_kill() switching back to terminal mode\n");
- switch_to_text();
- }
- block_task(task, ZOMBIE);
-}
-
static bool is_dead_task_crit(task_t* task) {
static char* crit_tasks[3] = {"idle",
- "reaper",
"iosentinel"
};
@@ -88,7 +74,6 @@ static bool is_dead_task_crit(task_t* task) {
return false;
}
-void reap();
static void tasking_critical_fail() {
char* msg = "One or more critical tasks died. axle has died.\n";
printf("%s\n", msg);
@@ -101,20 +86,24 @@ static void tasking_critical_fail() {
while (1) {}
}
-void _kill() {
- printk("_kill() strcmp %s returns %d\n", current_task->name, strcmp(current_task->name, "xserv"));
- bool show_died_message = !strcmp(current_task->name, "xserv");
+void kill_task(task_t* task) {
+ bool show_died_message = !strcmp(task->name, "xserv");
if (show_died_message) {
xserv_fail();
}
- if (is_dead_task_crit(current_task)) {
+ if (is_dead_task_crit(task)) {
tasking_critical_fail();
}
- block_task(current_task, ZOMBIE);
- reap();
- kill(current_task);
+ if (task == first_responder_task) {
+ resign_first_responder();
+ }
+ block_task(task, ZOMBIE);
+}
+
+void _kill() {
+ kill_task(current_task);
}
void goto_pid(int id);
@@ -250,15 +239,12 @@ void destroy_task(task_t* task) {
}
//remove task from queues and active list
unlist_task(task);
- printf_info("%s[%d] destroyed.", task->name, task->id);
+ //printf_info("%s[%d] destroyed.", task->name, task->id);
//free task's page directory
//free_directory(task->page_dir);
}
-void reap() {
- while (1) {
- task_t* tmp = active_list;
- while (tmp != NULL) {
+void reap_task(task_t* tmp) {
if (tmp->state == ZOMBIE) {
array_m* queue = array_m_lookup(queues, tmp->queue);
int idx = array_m_index(queue, tmp);
@@ -295,12 +281,6 @@ void reap() {
}
}
}
- tmp = tmp->next;
- }
-
- //we have nothing else to do, yield cpu
- sys_yield(RUNNABLE);
- }
}
void iosent() {
|
Rust: Implement Ordering for Key
|
@@ -49,6 +49,31 @@ impl PartialEq for Key {
impl Eq for Key {}
+impl Ord for Key {
+ fn cmp(&self, other: &Self) -> std::cmp::Ordering {
+ let cmp = unsafe {
+ elektra_sys::keyCmp(
+ self.ptr.as_ptr() as *const elektra_sys::Key,
+ other.ptr.as_ptr() as *const elektra_sys::Key,
+ )
+ };
+
+ if cmp < 0 {
+ std::cmp::Ordering::Less
+ } else if cmp == 0 {
+ std::cmp::Ordering::Equal
+ } else {
+ std::cmp::Ordering::Greater
+ }
+ }
+}
+
+impl PartialOrd for Key {
+ fn partial_cmp(&self, other: &Self) -> Option<std::cmp::Ordering> {
+ Some(self.cmp(other))
+ }
+}
+
impl Key {
/// Construct a new empty key
pub fn new() -> Key {
@@ -282,4 +307,38 @@ mod tests {
assert!(key2 == key3);
assert!(key == key3);
}
+
+ #[test]
+ fn keys_are_ordered() {
+ let mut key = Key::new();
+ key.set_name("user/test/a").unwrap();
+
+ let mut key2 = Key::new();
+ key2.set_name("user/test/b").unwrap();
+
+ let mut key3 = Key::new();
+ key3.set_name("user/test/c").unwrap();
+
+ assert!(key != key2);
+ assert!(key < key2);
+ assert!(key2 > key);
+
+ // Check for antisymmetry
+ assert!(!(key > key2));
+ assert!(!(key2 < key));
+
+ // Check for transitivity
+ assert!(key2 < key3);
+ assert!(key < key3);
+ }
+
+ #[test]
+ fn keys_are_ordered_with_metadata() {
+ // TODO Add once it's possible to add metadata
+ //Key * k1 = keyNew("user/a", KEY_OWNER, "markus", KEY_END);
+ //Key * k2 = keyNew("user/a", KEY_OWNER, "max", KEY_END);
+ // keyCmp(k1,k2) < 0
+ // keyCmp(k2,k1) > 0
+ assert!(5 + 2 == 7);
+ }
}
|
SOVERSION bump to version 5.1.1
|
@@ -39,7 +39,7 @@ set(SYSREPO_VERSION ${SYSREPO_MAJOR_VERSION}.${SYSREPO_MINOR_VERSION}.${SYSREPO_
# with backward compatible change and micro version is connected with any internal change of the library.
set(SYSREPO_MAJOR_SOVERSION 5)
set(SYSREPO_MINOR_SOVERSION 1)
-set(SYSREPO_MICRO_SOVERSION 0)
+set(SYSREPO_MICRO_SOVERSION 1)
set(SYSREPO_SOVERSION_FULL ${SYSREPO_MAJOR_SOVERSION}.${SYSREPO_MINOR_SOVERSION}.${SYSREPO_MICRO_SOVERSION})
set(SYSREPO_SOVERSION ${SYSREPO_MAJOR_SOVERSION})
|
pbio/control: reverse nesting of anti-windup check
First check control type, then windup condition, instead the opposite.
This commit changes nothing to the control: it just allows us to alter the windup condition per control type, in the next commit.
|
@@ -60,21 +60,26 @@ void control_update(pbio_control_t *ctl, int32_t time_now, int32_t count_now, in
int32_t max_windup_duty = (ctl->settings.max_control - ctl->settings.control_offset) + (ctl->settings.pid_kp * abs(rate_now) * PBIO_CONFIG_SERVO_PERIOD_MS * 2) / MS_PER_SECOND;
// Position anti-windup: pause trajectory or integration if falling behind despite using maximum duty
- if (abs(duty_due_to_proportional) >= max_windup_duty) {
- // We are at the duty limit and we should prevent further position error "integration".
+
+ // Position anti-windup in case of angle control (position error may not get too high)
if (ctl->type == PBIO_CONTROL_ANGLE) {
+ if (abs(duty_due_to_proportional) >= max_windup_duty) {
+ // We are at the duty limit and we should prevent further position error integration.
pbio_count_integrator_pause(&ctl->count_integrator, time_now, count_now, count_ref);
}
else {
- pbio_rate_integrator_pause(&ctl->rate_integrator, time_now, count_now, count_ref);
+ // Not at the limitm so continue integrating errors
+ pbio_count_integrator_resume(&ctl->count_integrator, time_now, count_now, count_ref);
}
}
+ // Position anti-windup in case of timed speed control (speed integral may not get too high)
else {
- // Otherwise, the integrator should be running
- if (ctl->type == PBIO_CONTROL_ANGLE) {
- pbio_count_integrator_resume(&ctl->count_integrator, time_now, count_now, count_ref);
+ if (abs(duty_due_to_proportional) >= max_windup_duty) {
+ // We are at the duty limit and we should prevent further speed error integration.
+ pbio_rate_integrator_pause(&ctl->rate_integrator, time_now, count_now, count_ref);
}
else {
+ // Not at the limitm so continue integrating errors
pbio_rate_integrator_resume(&ctl->rate_integrator, time_now, count_now, count_ref);
}
}
|
dnstap create debug tool with other debug tools in list.
|
@@ -310,7 +310,8 @@ rsrc_unbound_checkconf.o: $(srcdir)/winrc/rsrc_unbound_checkconf.rc config.h
TEST_BIN=asynclook$(EXEEXT) delayer$(EXEEXT) \
lock-verify$(EXEEXT) memstats$(EXEEXT) perf$(EXEEXT) \
petal$(EXEEXT) pktview$(EXEEXT) streamtcp$(EXEEXT) \
- testbound$(EXEEXT) unittest$(EXEEXT) unbound-dnstap-socket$(EXEEXT)
+ unbound-dnstap-socket$(EXEEXT) \
+ testbound$(EXEEXT) unittest$(EXEEXT)
tests: all $(TEST_BIN)
check: test
|
path of neo - additional changes
|
@@ -59,12 +59,22 @@ char* movies[] =
"WB_Green"
};
+char* misc[] =
+{
+ "film_scratch",
+ "oldfilm_noise04"
+ //"Hud_Generic_box",
+ //"Black_888"
+ //"HelveticaNeue_BoldCond"
+};
+
injector::hook_back<void(__cdecl*)(void* a1, void* a2, void* a3, void* a4, float a5, float a6, float a7, float a8, void* a9, float a10, float a11, float a12)> hb_538E80;
void __cdecl sub_538E80(void* a1, void* a2, void* a3, void* a4, float a5, float a6, float a7, float a8, void* a9, float a10, float a11, float a12)
-{
- if (*(float*)a1 == 0.0f && *(float*)a2 == 1.0f && *(float*)a3 == 0.0f && *(float*)a4 == 1.0f && a12 == 2.0f) //fullscreen drawings
{
auto text = *(uint32_t*)((uintptr_t)a9 + 4);
+
+ if (*(float*)a1 == 0.0f && *(float*)a2 == 1.0f && *(float*)a3 == 0.0f && *(float*)a4 == 1.0f && (a12 == 2.0f || a12 == 4.0f)) //fullscreen drawings
+ {
bool bFound = false;
for each (auto var in movies)
@@ -80,11 +90,16 @@ void __cdecl sub_538E80(void* a1, void* a2, void* a3, void* a4, float a5, float
return hb_538E80.fun(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12);
}
+ auto x = (char*)((uintptr_t)a9 + 4);
+
+ if (*(uint32_t*)misc[0] != text && *(uint32_t*)misc[1] != text)
+ {
*(float*)a1 /= Screen.fHudScale;
*(float*)a2 /= Screen.fHudScale;
*(float*)a1 += Screen.fHudOffsetReal / Screen.fWidth;
*(float*)a2 += Screen.fHudOffsetReal / Screen.fWidth;
+ }
return hb_538E80.fun(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12);
}
@@ -133,6 +148,12 @@ DWORD WINAPI Init(LPVOID bDelay)
}
}; injector::MakeInline<ResHook>(pattern1.count(3).get(2).get<void>(0), pattern2.count(2).get(1).get<void>(0)); //0x40DD33, 0x40DE21
+ //forcing 4:3 aspect, maybe better to hook sub_4BC320
+ pattern = hook::pattern("A3 ? ? ? ? A1 ? ? ? ? 85 C0 0F 84 ? ? ? ? 6A 01");
+ injector::MakeNOP(pattern.get_first(0), 5, true);
+ injector::WriteMemory(pattern2.count(2).get(1).get<uint32_t>(13), 0, true);
+ injector::WriteMemory(*pattern2.count(2).get(1).get<uint32_t>(9), 0, true);
+
pattern = hook::pattern("05 94 00 00 00 D9 5C 24 08");
struct AspectHook
{
|
Fix default CreateProcess parent directory path
|
@@ -2725,11 +2725,12 @@ NTSTATUS PhCreateProcessWin32Ex(
NTSTATUS status;
PPH_STRING fileName = NULL;
PPH_STRING commandLine = NULL;
+ PPH_STRING currentDirectory = NULL;
STARTUPINFO startupInfo;
PROCESS_INFORMATION processInfo;
ULONG newFlags;
- if (CommandLine) // duplicate because CreateProcess modifies the string
+ if (CommandLine) // duplicate because CreateProcess modifies the string (wj32)
commandLine = PhCreateString(CommandLine);
if (FileName)
@@ -2739,7 +2740,7 @@ NTSTATUS PhCreateProcessWin32Ex(
INT cmdlineArgCount;
PWSTR* cmdlineArgList;
- // (dmex) Try extract the filename or CreateProcess might execute the wrong executable.
+ // Try extract the filename or CreateProcess might execute the wrong executable. (dmex)
if (commandLine && (cmdlineArgList = CommandLineToArgvW(commandLine->Buffer, &cmdlineArgCount)))
{
PhMoveReference(&fileName, PhCreateString(cmdlineArgList[0]));
@@ -2750,7 +2751,7 @@ NTSTATUS PhCreateProcessWin32Ex(
{
PPH_STRING filePathSr;
- // The user typed a name without a path so attempt to locate the executable.
+ // The user typed a name without a path so attempt to locate the executable. (dmex)
if (filePathSr = PhSearchFilePath(fileName->Buffer, L".exe"))
PhMoveReference(&fileName, filePathSr);
else
@@ -2758,6 +2759,16 @@ NTSTATUS PhCreateProcessWin32Ex(
}
}
+ // Set the current directory to the same location as the target executable
+ // or CreateProcess uses our current directory. (dmex)
+ if (CurrentDirectory)
+ currentDirectory = PhCreateString(CurrentDirectory);
+ else
+ {
+ if (!PhIsNullOrEmptyString(fileName))
+ currentDirectory = PhGetBaseDirectory(fileName);
+ }
+
newFlags = 0;
PhMapFlags1(&newFlags, Flags, PhpCreateProcessMappings, sizeof(PhpCreateProcessMappings) / sizeof(PH_FLAG_MAPPING));
@@ -2778,7 +2789,7 @@ NTSTATUS PhCreateProcessWin32Ex(
!!(Flags & PH_CREATE_PROCESS_INHERIT_HANDLES),
newFlags,
Environment,
- CurrentDirectory,
+ PhGetString(currentDirectory),
StartupInfo ? StartupInfo : &startupInfo,
&processInfo
))
@@ -2796,7 +2807,7 @@ NTSTATUS PhCreateProcessWin32Ex(
!!(Flags & PH_CREATE_PROCESS_INHERIT_HANDLES),
newFlags,
Environment,
- CurrentDirectory,
+ PhGetString(currentDirectory),
StartupInfo ? StartupInfo : &startupInfo,
&processInfo
))
@@ -2809,6 +2820,8 @@ NTSTATUS PhCreateProcessWin32Ex(
PhDereferenceObject(fileName);
if (commandLine)
PhDereferenceObject(commandLine);
+ if (currentDirectory)
+ PhDereferenceObject(currentDirectory);
if (NT_SUCCESS(status))
{
|
[ctr/lua] small fix
limit the number of events in one transaction to 50
|
@@ -960,7 +960,7 @@ func LuaEvent(L *LState, service *C.int, eventName *C.char, args *C.char) C.int
luaPushStr(L, "[Contract.Event] event not permitted in query")
return -1
}
- if stateSet.eventCount > maxEventCnt {
+ if stateSet.eventCount >= maxEventCnt {
luaPushStr(L, fmt.Sprintf("[Contract.Event] exceeded the maximum number of events(%d)", maxEventCnt))
return -1
}
|
move ssl comment to top
|
%if 0%{?suse_version}
BuildRequires: kernel-source
BuildRequires: kernel-default-devel
+# needssslcertforbuild
+export BRP_PESIGN_FILES='*.ko'
BuildRequires: pesign-obs-integration
%define sles_kernel 4.4.21-69-default
%define kdir /lib/modules/%{sles_kernel}/source/
@@ -291,8 +293,7 @@ ln lnet/ChangeLog ChangeLog-lnet
%build
-# needssslcertforbuild
-export BRP_PESIGN_FILES='*.ko'
+
# Set an explicit path to our Linux tree, if we can.
cd $RPM_BUILD_DIR/lustre-%{version}
|
SOVERSION bump to version 2.24.0
|
@@ -65,8 +65,8 @@ set(LIBYANG_MICRO_VERSION 238)
set(LIBYANG_VERSION ${LIBYANG_MAJOR_VERSION}.${LIBYANG_MINOR_VERSION}.${LIBYANG_MICRO_VERSION})
# set version of the library
set(LIBYANG_MAJOR_SOVERSION 2)
-set(LIBYANG_MINOR_SOVERSION 23)
-set(LIBYANG_MICRO_SOVERSION 2)
+set(LIBYANG_MINOR_SOVERSION 24)
+set(LIBYANG_MICRO_SOVERSION 0)
set(LIBYANG_SOVERSION_FULL ${LIBYANG_MAJOR_SOVERSION}.${LIBYANG_MINOR_SOVERSION}.${LIBYANG_MICRO_SOVERSION})
set(LIBYANG_SOVERSION ${LIBYANG_MAJOR_SOVERSION})
|
tests: Update travis-ci tests
This updates the travis-ci tests to run on CentOS 8 instead of 7.
|
-FROM centos:7
+FROM centos:8
ARG TRAVIS_COMMIT_RANGE
ENV TRAVIS_COMMIT_RANGE=$TRAVIS_COMMIT_RANGE
ENV PYTHON_BINARY=python3
-RUN yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
+RUN yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
RUN yum install -y git ${PYTHON_BINARY}
COPY . /ohpc
|
tools/mksymtab.sh: Include nuttx/symtab.h instead of nuttx/binfmt/symtab.h.
|
@@ -86,7 +86,7 @@ fi
# faile
echo "#include <nuttx/compiler.h>" >$outfile
-echo "#include <nuttx/binfmt/symtab.h>" >>$outfile
+echo "#include <nuttx/symtab.h>" >>$outfile
echo "" >>$outfile
for var in $varlist; do
|
GBP: format EPG retention policy
|
@@ -324,6 +324,16 @@ VLIB_CLI_COMMAND (gbp_endpoint_group_cli_node, static) = {
.function = gbp_endpoint_group_cli,
};
+static u8 *
+format_gbp_endpoint_retention (u8 * s, va_list * args)
+{
+ gbp_endpoint_retention_t *rt = va_arg (*args, gbp_endpoint_retention_t*);
+
+ s = format (s, "[remote-EP-timeout:%d]", rt->remote_ep_timeout);
+
+ return (s);
+}
+
u8 *
format_gbp_endpoint_group (u8 * s, va_list * args)
{
@@ -331,13 +341,14 @@ format_gbp_endpoint_group (u8 * s, va_list * args)
vnet_main_t *vnm = vnet_get_main ();
if (NULL != gg)
- s = format (s, "[%d] %d, sclass:%d bd:[%d,%d], rd:[%d] uplink:%U locks:%d",
+ s = format (s, "[%d] %d, sclass:%d bd:[%d,%d] rd:[%d] uplink:%U retnetion:%U locks:%d",
gg - gbp_endpoint_group_pool,
gg->gg_id,
gg->gg_sclass,
gbp_endpoint_group_get_bd_id(gg), gg->gg_bd_index,
gg->gg_rd,
format_vnet_sw_if_index_name, vnm, gg->gg_uplink_sw_if_index,
+ format_gbp_endpoint_retention, &gg->gg_retention,
gg->gg_locks);
else
s = format (s, "NULL");
|
Allow running spec tests on wasm port
|
@@ -170,7 +170,23 @@ from queue import Queue, Empty
class Wasm3():
def __init__(self, executable):
- self.exe = executable
+ if executable.endswith(".wasm"):
+ (engine, executable) = executable.split(maxsplit=1)
+
+ if engine == "wasmer":
+ self.exe = [engine, "run", "--dir=.", executable, "--"]
+ #elif engine == "wasmer-js":
+ # self.exe = [engine, "run", executable]
+ elif engine == "wasirun":
+ self.exe = [engine, executable]
+ elif engine == "wasmtime":
+ self.exe = [engine, "--dir=.", "--optimize", executable, "--"]
+ elif engine == "iwasm":
+ self.exe = [engine, "--dir=.", executable]
+ else:
+ fatal(f"Don't know how to run engine {engine}")
+ else:
+ self.exe = [executable]
self.p = None
self.timeout = 3.0
@@ -180,7 +196,7 @@ class Wasm3():
self.loaded = fn
self.p = Popen(
- [self.exe, "--repl", fn],
+ self.exe + ["--repl", fn],
shell = False,
bufsize=0, stdin=PIPE, stdout=PIPE, stderr=STDOUT
)
|
Fix Spelling: Create section for brand terms
|
s/behaviour/behavior/g
+# ==========
+# = Brands =
+# ==========
+
+s/\<[CcFf]engine/CFEngine/g
+
+# Only fix spelling of GitHub outside of URLs:
+s/([^.`])git[hH]ub([^.][^\w])/\1GitHub\2/g
+
+s/\<[Ll]ibreoffice/LibreOffice/g
+
+s/\<unix|UNIX/Unix/g
+
# ===================
# = Technical Terms =
# ===================
@@ -47,8 +60,6 @@ s/\<(compile|deployment|mount|run|startup) ?time/\1-time/g
s/\<time[- ]stamp/timestamp/g
-s/\<unix|UNIX/Unix/g
-
s/\<sub[- ]project/subproject/g
s/\<C-(array|code|name|string)/C \1/g
@@ -85,17 +96,10 @@ s/\<[^-]symlink/symbolic link/g
s/\<middle[- ]ware/middleware/g
-s/\<[CcFf]engine/CFEngine/g
-
# s/\</gcc/GCC/g
# plural
s/\<files-?ystem\>/file system/g
-s/\<[Ll]ibreoffice/LibreOffice/g
-
-# Only fix spelling of GitHub outside of URLs:
-s/([^.`])git[hH]ub([^.][^\w])/\1GitHub\2/g
-
#s/\<dependencies/dependences/g
#s/\<dependency/dependence/g
|
Fix CYW43/LWIP and soft-reset bugs.
|
@@ -523,8 +523,8 @@ soft_reset:
#if LWIP_MDNS_RESPONDER
mdns_resp_init();
#endif
- systick_enable_dispatch(SYSTICK_DISPATCH_LWIP, mod_network_lwip_poll_wrapper);
}
+ systick_enable_dispatch(SYSTICK_DISPATCH_LWIP, mod_network_lwip_poll_wrapper);
#endif
#if MICROPY_PY_NETWORK_CYW43
@@ -722,6 +722,12 @@ soft_reset:
}
} while (openmv_config.wifidbg == true);
+ #if MICROPY_PY_LWIP
+ // Must call GC sweep here to close open sockets.
+ gc_sweep_all();
+ systick_disable_dispatch(SYSTICK_DISPATCH_LWIP);
+ #endif
+
// Disable all other IRQs except Systick and Flash IRQs
// Note: FS IRQ is disable, since we're going for a soft-reset.
irq_set_base_priority(IRQ_PRI_FLASH+1);
@@ -745,9 +751,6 @@ soft_reset:
#ifdef IMLIB_ENABLE_DMA2D
imlib_draw_row_deinit_all();
#endif
- #if MICROPY_PY_LWIP
- gc_sweep_all();
- #endif
first_soft_reset = false;
goto soft_reset;
}
|
Year on source files bumped.
|
The MIT License (MIT)
-Copyright (c) 2009-2016 Gerardo Orellana <hello @ goaccess.io>
+Copyright (c) 2009-2022 Gerardo Orellana <hello @ goaccess.io>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
|
Change requirement on SSE 4.2 to SSE 4.1 (CI)
|
@@ -32,7 +32,7 @@ pipeline {
sh '''
cd ./Source/
make CXX=clang++ VEC=avx2
- make CXX=clang++ VEC=sse4.2
+ make CXX=clang++ VEC=sse4.1
make CXX=clang++ VEC=sse2
'''
}
@@ -70,7 +70,7 @@ pipeline {
bat '''
call c:\\progra~2\\micros~1\\2019\\buildtools\\vc\\auxiliary\\build\\vcvars64.bat
call msbuild .\\Source\\VS2019\\astcenc-avx2.vcxproj /p:Configuration=Release /p:Platform=x64
- call msbuild .\\Source\\VS2019\\astcenc-sse4.2.vcxproj /p:Configuration=Release /p:Platform=x64
+ call msbuild .\\Source\\VS2019\\astcenc-sse4.1.vcxproj /p:Configuration=Release /p:Platform=x64
call msbuild .\\Source\\VS2019\\astcenc-sse2.vcxproj /p:Configuration=Release /p:Platform=x64
'''
}
@@ -80,7 +80,7 @@ pipeline {
bat '''
call c:\\progra~2\\micros~1\\2019\\buildtools\\vc\\auxiliary\\build\\vcvars64.bat
call msbuild .\\Source\\VS2019\\astcenc-avx2.vcxproj /p:Configuration=Debug /p:Platform=x64
- call msbuild .\\Source\\VS2019\\astcenc-sse4.2.vcxproj /p:Configuration=Debug /p:Platform=x64
+ call msbuild .\\Source\\VS2019\\astcenc-sse4.1.vcxproj /p:Configuration=Debug /p:Platform=x64
call msbuild .\\Source\\VS2019\\astcenc-sse2.vcxproj /p:Configuration=Debug /p:Platform=x64
'''
}
@@ -118,7 +118,7 @@ pipeline {
sh '''
cd ./Source/
make VEC=avx2
- make VEC=sse4.2
+ make VEC=sse4.1
make VEC=sse2
'''
}
|
correctly check for outdents without intervening blank lines
|
$head |
::
:: literals need to end with a blank line
- ?($code $poem $expr) (gte col.pic col)
+ ?($code $poem $expr) (gte col.pic (add cur-indent col))
::
:: text flows must continue aligned
?($down $list $lime $lord $bloc) =(col.pic col)
|
rm unnecessary CMake definition;
|
@@ -94,12 +94,10 @@ endif()
# ODE
if (WIN32 OR EMSCRIPTEN)
- add_definitions(-DdIDESINGLE)
add_subdirectory(deps/ode ode)
include_directories(deps/ode/include "${CMAKE_CURRENT_BINARY_DIR}/ode/include")
set(LOVR_ODE ode)
else()
- add_definitions(-DdIDESINGLE)
pkg_search_module(ODE REQUIRED ode)
include_directories(${ODE_INCLUDE_DIRS})
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -lstdc++")
|
Fix ethereum explorer links
|
@@ -16,13 +16,13 @@ namespace MiningCore.Blockchain
{ CoinType.ETH, new Dictionary<string, string>
{
{ string.Empty, "https://etherscan.io/block/{0}" },
- { EthereumConstants.BlockTypeUncle, "https://etherscan.io/uncle/{0}" },
+ { EthereumConstants.BlockTypeUncle, "https://etherscan.io/uncle/{BlockHeightPH}" },
}},
{ CoinType.ETC, new Dictionary<string, string>
{
{ string.Empty, "https://gastracker.io/block/{0}" },
- { EthereumConstants.BlockTypeUncle, "https://gastracker.io/uncle/{0}" }
+ { EthereumConstants.BlockTypeUncle, "https://gastracker.io/uncle/{BlockHeightPH}" }
}},
{ CoinType.XMR, new Dictionary<string, string> { { string.Empty, $"https://chainradar.com/xmr/block/{BlockHeightPH}" }}},
|
Add more oculus manifest permissions;
Keyboard tracking
Render model
Passthrough
|
<uses-feature android:glEsVersion="0x00030001" android:required="true"/>
<uses-feature android:name="android.hardware.vr.headtracking" android:required="false"/>
<uses-feature android:name="oculus.software.handtracking" android:required="false"/>
+ <uses-feature android:name="oculus.software.trackedkeyboard" android:required="false"/>
+ <uses-feature android:name="com.oculus.feature.RENDER_MODEL" android:required="false"/>
+ <uses-feature android:name="com.oculus.feature.PASSTHROUGH" android:required="false"/>
<uses-permission android:name="com.oculus.permission.HAND_TRACKING"/>
+ <uses-permission android:name="com.oculus.permission.TRACKED_KEYBOARD"/>
+ <uses-permission android:name="com.oculus.permission.RENDER_MODEL"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
|
Docs: Change vendor layer to vendor dependency layer
Also fixed issue and issue
|
@@ -36,11 +36,11 @@ Figure 3-1 The position of BoAT in the blockchain interactive network
## BoAT Implementation Framework
-Boat follows a hierarchical design consisting of Interface Layer, Protocol Layer, RPC Layer, Vendor Layer, Tool and Utility. The specific functions of each layer are as follows:
+Boat follows a hierarchical design consisting of Interface Layer, Protocol Layer, RPC Layer, Vendor Dependency Layer, Tool and Utility. The specific functions of each layer are as follows:
+ Interface Layer: Provide an interface for users to invoke the corresponding blockchain.
+ Protocol Layer: The main implementation of each block chain protocol.
+ RPC Layer: Provide services to the protocol layer.
-+ Vendor Layer: Provide cryptographic algorithms, signature, storage and other services for the interface layer wallet.
++ Vendor Dependency Layer: Provide cryptographic algorithms, signature, storage and other services for the interface layer wallet.
+ Tool: The general tool layer is used to generate the C language interface of the smart contract and provide services such as data encoding and format conversion for the remaining layers.
+ Utility: The utility program provides services such as data format conversion, message encoding and decoding to each layer.
@@ -57,7 +57,7 @@ The interface layer is located at the top layer of BoAT and provides users with
+ Transaction interface
* Each blockchain provides a set of transaction interfaces with similar functions but different implementations.
-The wallet interface of the interface layer is supported by the hardware dependent layer. For the description of the hardware dependent layer, please refer to [Hardware dependency layer](#Hardware-dependency-layer).
+The wallet interface of the interface layer is supported by the vendor dependency layer. For the description of the vendor dependency layer, please refer to [Vendor Dependency Layer](#vendor-dependency-layer).
The transaction interface of the interface layer is supported by the protocol layer. For a description of the protocol layer, please refer to [Protocol layer](#Protocol-layer).
#### Wallet Interface
@@ -415,12 +415,12 @@ cURL is a file transfer tool that uses URL syntax to work under the command line
-### Vendor Layer
+### Vendor Dependency Layer
#### Overview
-The Boat SDK will run on different hardware platforms, because the various hardware platforms provided by various vendors have various functions. For example, some hardware platforms provide hardware implementation of random number generator, while some hardware platforms provide not only hardware implementation of random number generator, but also TEE environment. In order to leverage the platform's resources and to isolate changes in the software, the Boat SDK designed a vendor layer. The vendor layer provides services such as random number generator, secure storage, encrypted signature and so on to the wallet in the interface layer. When the hardware platform can provide the corresponding implementation, the vendor layer will call the corresponding hardware function through the interface reserved by the vendor. When the hardware platform does not provide some services, the corresponding functions are realized by pure software.
+The Boat SDK will run on different hardware platforms, because the various hardware platforms provided by various vendors have various functions. For example, some hardware platforms provide hardware implementation of random number generator, while some hardware platforms provide not only hardware implementation of random number generator, but also TEE environment. In order to leverage the platform's resources and to isolate changes in the software, the Boat SDK designed a vendor dependencylayer. The vendor dependency layer provides services such as random number generator, secure storage, encrypted signature and so on to the wallet in the interface layer. When the hardware platform can provide the corresponding implementation, the vendor dependency layer will call the corresponding hardware function through the interface reserved by the vendor. When the hardware platform does not provide some services, the corresponding functions are realized by pure software.
-#### Software Implementation of The Hardware Dependent Layer
-The vendor layer should provide a pure software implementation of the required services. This allows the Boat SDK to function properly even when the hardware does not provide the required services. The vendor layer should cover the necessary hardware services as a standard, providing at least a software-only implementation of the following functions:
+#### Software Implementation of The Vendor Dependency Layer
+The vendor dependency layer should provide a pure software implementation of the required services. This allows the Boat SDK to function properly even when the hardware does not provide the required services. The vendor dependency layer should cover the necessary hardware services as a standard, providing at least a software-only implementation of the following functions:
+ Random number generator
+ Signature (such as ECDSA used by Ethereum)
+ Secure storage (such as storing private keys in an encrypted manner)
|
fix comment and name issues in debug helper
|
@@ -300,7 +300,7 @@ class NamedGroupDefinition:
Generate helper functions for named group
It generates translation function from named group define to string.
- Signature algorithm definition looks like:
+ Named group definition looks like:
#define MBEDTLS_SSL_IANA_TLS_GROUP_[ upper case named group ] [ value(hex) ]
Known limitation:
@@ -309,10 +309,10 @@ class NamedGroupDefinition:
@classmethod
def extract(cls, source_code, start=0, end=-1):
- sig_alg_pattern = re.compile(r'#define\s+(?P<name>MBEDTLS_SSL_IANA_TLS_GROUP_\w+)\s+' +
+ named_group_pattern = re.compile(r'#define\s+(?P<name>MBEDTLS_SSL_IANA_TLS_GROUP_\w+)\s+' +
r'(?P<value>0[xX][0-9a-fA-F]+)$',
re.MULTILINE | re.DOTALL)
- matches = list(sig_alg_pattern.finditer(source_code, start, end))
+ matches = list(named_group_pattern.finditer(source_code, start, end))
if matches:
yield NamedGroupDefinition(source_code, definitions=matches)
|
Actor set position no longer limited to 30 tiles
|
@@ -6,26 +6,26 @@ export const fields = [
{
key: "actorId",
type: "actor",
- defaultValue: "player"
+ defaultValue: "player",
},
{
key: "x",
label: l10n("FIELD_X"),
type: "number",
min: 0,
- max: 30,
+ max: 256,
width: "50%",
- defaultValue: 0
+ defaultValue: 0,
},
{
key: "y",
label: l10n("FIELD_Y"),
type: "number",
min: 0,
- max: 31,
+ max: 256,
width: "50%",
- defaultValue: 0
- }
+ defaultValue: 0,
+ },
];
export const compile = (input, helpers) => {
|
Adapt `ffMonitor()` to ahrs_approx - only send the FF AHRS packets when FF is detected.
|
@@ -35,6 +35,43 @@ func chkErr(err error) {
}
}
+/*
+ ffMonitor().
+ Watches for "i-want-to-play-ffm-udp", "i-can-play-ffm-udp", and "i-cannot-play-ffm-udp" UDP messages broadcasted on
+ port 50113. Tags the client, issues a warning, and disables AHRS GDL90 output.
+
+*/
+
+var ffPlay bool
+
+func ffMonitor() {
+ addr := net.UDPAddr{Port: 50113, IP: net.ParseIP("0.0.0.0")}
+ conn, err := net.ListenUDP("udp", &addr)
+ if err != nil {
+ fmt.Printf("ffMonitor(): error listening on port 50113: %s\n", err.Error())
+ return
+ }
+ defer conn.Close()
+ for {
+ buf := make([]byte, 1024)
+ n, _, err := conn.ReadFrom(buf)
+ if err != nil {
+ fmt.Printf("err: %s\n", err.Error())
+ return
+ }
+ // Got message, check if it's in the correct format.
+ if n < 3 || buf[0] != 0xFF || buf[1] != 0xFE {
+ continue
+ }
+ s := string(buf[2:n])
+ s = strings.Replace(s, "\x00", "", -1)
+ if strings.HasPrefix(s, "i-want-to-play-ffm-udp") || strings.HasPrefix(s, "i-can-play-ffm-udp") {
+ // Enable AHRS emulation.
+ ffPlay = true
+ }
+ }
+}
+
func situationUpdater() {
situationUpdateTicker := time.NewTicker(100 * time.Millisecond)
for {
@@ -136,6 +173,7 @@ func main() {
fmt.Printf("loaded %d size ahrs table.\n", len(ahrsTable))
go situationUpdater()
+ go ffMonitor()
tm := time.NewTicker(125 * time.Millisecond)
for {
@@ -157,7 +195,7 @@ func main() {
mB = trigger
}
}
- if len(mB) > 0 {
+ if len(mB) > 0 && ffPlay { // Only send if we have both an AHRS approximation to send and FF was detected.
conn.Write(mB)
}
}
|
disable networking for fake ships on restart
|
@@ -1250,6 +1250,12 @@ _pier_work_poke(void* vod_p,
pir_u->fak_o = u3t(r_jar);
pir_u->who_d[0] = who_d[0];
pir_u->who_d[1] = who_d[1];
+
+ /* Disable networking for fake ships
+ */
+ if ( c3y == pir_u->fak_o ) {
+ u3_Host.ops_u.net = c3n;
+ }
}
}
|
bump docs rev to 1.4
|
%{!?PROJ_DELIM: %global PROJ_DELIM -ohpc}
Name: docs%{PROJ_DELIM}
-Version: 1.3.1
+Version: 1.4
Release: 1
Summary: OpenHPC documentation
License: BSD-3-Clause
|
Update i2c.rst
I2C mode is set during configuration, not the 'op(eration) mode'
Closes
|
@@ -31,7 +31,7 @@ Configure Driver
The first step to establishing I2C communication is to configure the driver. This is done by setting several parameters contained in :cpp:type:`i2c_config_t` structure:
-* I2C **operation mode** - select either slave or master from :cpp:type:`i2c_opmode_t`
+* I2C **mode** - select either slave or master from :cpp:type:`i2c_mode_t`
* Settings of the **communication pins**:
* GPIO pin numbers assigned to the SDA and SCL signals
@@ -56,7 +56,7 @@ Install Driver
Having the configuration initialized, the next step is to install the I2C driver by calling :cpp:func:`i2c_driver_install`. This function call requires the following parameters:
* The port number, one of the two ports available, selected from :cpp:type:`i2c_port_t`
-* The operation mode, slave or master selected from :cpp:type:`i2c_opmode_t`
+* The I2C mode, slave or master, selected from :cpp:type:`i2c_mode_t`
* Sizes of buffers that will be allocated for sending and receiving data **in the slave mode**
* Flags used to allocate the interrupt
|
add test for correct owner behaviour
|
@@ -95,10 +95,10 @@ static void test_keyCmp (void)
succeed_if (keyCmp (k1, k2) < 0, "find_me is smaller");
succeed_if (keyCmp (k2, k1) > 0, "find_me is smaller");
- keySetName (k1, "user:user_a/a");
+ keySetName (k1, "user:user_a/b");
keySetName (k2, "user:user_b/a");
- succeed_if (keyCmp (k1, k2) == 0, "should be same as owner is not considered");
- succeed_if (keyCmp (k2, k1) == 0, "should be same as owner is not considered");
+ succeed_if (keyCmp (k1, k2) < 0, "should be same as owner is not considered");
+ succeed_if (keyCmp (k2, k1) > 0, "should be same as owner is not considered");
keyDel (k1);
keyDel (k2);
|
output_thread: initialize coroutine threaded with the API
|
@@ -186,6 +186,8 @@ static void output_thread(void *data)
ins = th_ins->ins;
thread_id = th_ins->th->id;
+ flb_coro_thread_init();
+
/*
* Expose the event loop to the I/O interfaces: since we are in a separate
* thread, the upstream connection interfaces need access to the event
|
added additional information to busy driver warning - in most of the cases, the driver is broken and doesn't accept packets from the socket
|
@@ -1517,7 +1517,7 @@ if(FD_ISSET(txsocket, &txfds))
return;
}
strftime(timestring, 16, "%H:%M:%S", localtime(&tv.tv_sec));
-fprintf(stdout, "%s %d/%d driver is busy: %s\n", timestring, ptrfscanlist->frequency, ptrfscanlist->channel, errormessage);
+fprintf(stdout, "%s %d/%d driver is busy/broken: %s\n", timestring, ptrfscanlist->frequency, ptrfscanlist->channel, errormessage);
return;
}
/*===========================================================================*/
@@ -2618,7 +2618,7 @@ if(FD_ISSET(fd_socket, &txfds))
return;
}
strftime(timestring, 16, "%H:%M:%S", localtime(&tv.tv_sec));
-fprintf(stdout, "%s %d/%d driver is busy: failed to retransmit EAP packet\n", timestring, ptrfscanlist->frequency, ptrfscanlist->channel);
+fprintf(stdout, "%s %d/%d driver is busy/broken: failed to retransmit EAP packet\n", timestring, ptrfscanlist->frequency, ptrfscanlist->channel);
return;
}
/*===========================================================================*/
|
Fix tests for Node port
|
@@ -25,7 +25,9 @@ const assert = require('assert');
const {
metacall,
metacall_load_from_file,
+ metacall_load_from_file_export,
metacall_load_from_memory,
+ metacall_load_from_memory_export,
metacall_handle,
metacall_inspect,
metacall_logs
@@ -37,6 +39,8 @@ describe('metacall', () => {
assert.notStrictEqual(metacall, undefined);
assert.notStrictEqual(metacall_load_from_memory, undefined);
assert.notStrictEqual(metacall_load_from_file, undefined);
+ assert.notStrictEqual(metacall_load_from_memory_export, undefined);
+ assert.notStrictEqual(metacall_load_from_file_export, undefined);
assert.notStrictEqual(metacall_inspect, undefined);
assert.notStrictEqual(metacall_logs, undefined);
});
@@ -121,12 +125,14 @@ describe('metacall', () => {
assert.strictEqual(escape('<html></html>'), '<html></html>');
});
// TODO: This fails, not sure why
+ /*
it('require (py submodule)', () => {
// This code loads directly a module without extension from Python
const { py_encode_basestring_ascii } = require('json.encoder');
assert.notStrictEqual(py_encode_basestring_ascii, undefined);
assert.strictEqual(py_encode_basestring_ascii('asd'), '"asd"');
});
+ */
it('require (rb)', () => {
// TODO: Both methods work, should we disable the commented out style to be NodeJS compilant?
// const cache = require('cache.rb');
@@ -145,23 +151,14 @@ describe('metacall', () => {
});
});
- // TODO: These tests fail because `require` no longer exports the functions to global scope
- /*
describe('call', () => {
- it('metacall (mock)', () => {
- assert.strictEqual(metacall('my_empty_func'), 1234);
- assert.strictEqual(metacall('three_str', 'a', 'b', 'c'), 'Hello World');
- });
it('metacall (py)', () => {
- assert.strictEqual(metacall('multiply', 2, 2), 4);
- assert.deepStrictEqual(metacall('return_array'), [1, 2, 3]);
- assert.deepStrictEqual(metacall('return_same_array', [4, 5, 6]), [4, 5, 6]);
+ assert.strictEqual(metacall('s_sum', 2, 2), 4);
});
it('metacall (rb)', () => {
assert.strictEqual(metacall('get_second', 5, 12), 12);
});
});
- */
// TODO: This fails because classes are not implemented in the NodeJS loader
/*
|
YAMBi: Fix error caused by unknown CMake command
|
@@ -6,16 +6,17 @@ if (DEPENDENCY_PHASE)
list (APPEND CMAKE_PREFIX_PATH
"/usr/local/opt/bison")
endif (APPLE)
+
find_package (Bison 3 QUIET)
+
if (NOT BISON_FOUND)
remove_plugin (yambi "Bison 3 (bison) not found")
- endif (NOT BISON_FOUND)
-
+ else (NOT BISON_FOUND)
bison_target (YAMBI ${CMAKE_CURRENT_SOURCE_DIR}/parser.ypp ${CMAKE_CURRENT_BINARY_DIR}/parser.cpp)
-
if (NOT BISON_YAMBI_DEFINED)
remove_plugin (yambi "Unable to generate parser")
endif (NOT BISON_YAMBI_DEFINED)
+ endif (NOT BISON_FOUND)
set (SOURCE_FILES
convert.hpp
|
Add space optimization flags
|
@@ -266,6 +266,8 @@ elif env['toolchain'] == 'armgcc':
env.Append(CCFLAGS='-Wall')
env.Append(CCFLAGS='-Wa,-adhlns=${TARGET.base}.lst')
env.Append(CCFLAGS='-c')
+ env.Append(CCFLAGS='-ffunction-sections')
+ env.Append(CCFLAGS='-fdata-sections')
env.Append(CCFLAGS='-fmessage-length=0')
env.Append(CCFLAGS='-mcpu=cortex-m3')
env.Append(CCFLAGS='-mthumb')
@@ -286,6 +288,7 @@ elif env['toolchain'] == 'armgcc':
env.Append(LINKFLAGS='-specs=nosys.specs')
env.Append(LINKFLAGS='-specs=nano.specs')
env.Append(LINKFLAGS='-Wl,-Map,${TARGET.base}.map')
+ env.Append(LINKFLAGS='-Wl,--gc-sections')
env.Append(LINKFLAGS='-mcpu=cortex-m3')
env.Append(LINKFLAGS='-mthumb')
env.Append(LINKFLAGS='-g3')
|
fix race condition in virtualization tests
|
@@ -68,10 +68,10 @@ int main(void) {
print_ipv6(&(destination.addr));
printf(" : %d\n", destination.port);
}
+ delay_ms(10);
result = udp_send_to(packet, len, &destination);
assert(result == TOCK_SUCCESS); //finally, a valid send attempt
- delay_ms(10);
//of the two apps, app2 binds to port 80 second and should fail
sock_addr_t addr2 = {
ifaces[0],
|
misc: add "show run summary"
Prints the interior node vector rate, rx / tx / drop rates
Type: feature
|
@@ -335,6 +335,7 @@ show_node_runtime (vlib_main_t * vm,
u64 n_internal_vectors, n_internal_calls;
u64 n_clocks, l, v, c, d;
int brief = 1;
+ int summary = 0;
int max = 0;
vlib_main_t **stat_vms = 0, *stat_vm;
@@ -345,6 +346,9 @@ show_node_runtime (vlib_main_t * vm,
brief = 0;
if (unformat (input, "max") || unformat (input, "m"))
max = 1;
+ if (unformat (input, "summary") || unformat (input, "sum")
+ || unformat (input, "su"))
+ summary = 1;
for (i = 0; i < vec_len (vlib_mains); i++)
{
@@ -446,7 +450,10 @@ show_node_runtime (vlib_main_t * vm,
(f64) n_input / dt,
(f64) n_output / dt, (f64) n_drop / dt, (f64) n_punt / dt);
- vlib_cli_output (vm, "%U", format_vlib_node_stats, stat_vm, 0, max);
+ if (summary == 0)
+ {
+ vlib_cli_output (vm, "%U", format_vlib_node_stats, stat_vm,
+ 0, max);
for (i = 0; i < vec_len (nodes); i++)
{
c =
@@ -457,8 +464,9 @@ show_node_runtime (vlib_main_t * vm,
nodes[i]->stats_last_clear.suspends;
if (c || d || !brief)
{
- vlib_cli_output (vm, "%U", format_vlib_node_stats, stat_vm,
- nodes[i], max);
+ vlib_cli_output (vm, "%U", format_vlib_node_stats,
+ stat_vm, nodes[i], max);
+ }
}
}
vec_free (nodes);
|
Core(M): Fix -Wundef for __ARM_FEATURE_DSP
This prevents multiple warnings when compiling with GCC
warning: "__ARM_FEATURE_DSP" is not defined, evaluates to 0 [-Wundef]
|
/**************************************************************************//**
* @file cmsis_gcc.h
* @brief CMSIS compiler GCC header file
- * @version V5.0.2
- * @date 13. February 2017
+ * @version V5.0.3
+ * @date 16. January 2018
******************************************************************************/
/*
* Copyright (c) 2009-2017 ARM Limited. All rights reserved.
@@ -1536,7 +1536,7 @@ __STATIC_FORCEINLINE uint32_t __STLEX(uint32_t value, volatile uint32_t *ptr)
@{
*/
-#if (__ARM_FEATURE_DSP == 1) /* ToDo ARMCLANG: This should be ARCH >= ARMv7-M + SIMD */
+#if (defined (__ARM_FEATURE_DSP) && (__ARM_FEATURE_DSP == 1))
__STATIC_FORCEINLINE uint32_t __SADD8(uint32_t op1, uint32_t op2)
{
|
only shrink frametime graph on mangoapp
|
@@ -584,17 +584,23 @@ void HudElements::frame_timing(){
NULL, min_time, max_time,
ImVec2(ImGui::GetContentRegionAvailWidth() * HUDElements.params->table_columns, 50));
} else {
+#ifdef MANGOAPP
+ int width = ImGui::GetContentRegionAvailWidth() * HUDElements.params->table_columns - 30;
+#else
+ int width = ImGui::GetContentRegionAvailWidth() * HUDElements.params->table_columns;
+#endif
ImGui::PlotLines(hash, get_time_stat, HUDElements.sw_stats,
ARRAY_SIZE(HUDElements.sw_stats->frames_stats), 0,
NULL, min_time, max_time,
- ImVec2(ImGui::GetContentRegionAvailWidth() * HUDElements.params->table_columns - 30, 50));
+ ImVec2(width, 50));
+#ifdef MANGOAPP
ImGui::SameLine();
ImGui::PushFont(HUDElements.sw_stats->font1);
ImGui::Text("%.1fms", frametime / 1000.f);
ImGui::PopFont();
+#endif
}
ImGui::PopStyleColor();
-
}
}
|
Refactor ensure_tile method.
|
@@ -73,16 +73,12 @@ class OpenGLTilesetAlias::impl : public TilesetObserver {
auto prepare_alias(const TCOD_Console& console) -> uint32_t
{
for (int i = 0; i < console.w * console.h; ++i) {
- int codepoint = console.tiles[i].ch;
- if (codepoint >= static_cast<int>(local_map_.size())
- || local_map_.at(codepoint) < 0) {
- if (ensure_tile(codepoint) == -1) {
+ if (ensure_tile(console.tiles[i].ch) == -1) {
// The texture alias was replaced by a bigger one.
i = -1; // Need to start over from the beginning.
continue;
}
}
- }
return gltexture_;
}
auto get_tile_position(int codepoint) const -> std::array<int, 2>
@@ -156,6 +152,9 @@ class OpenGLTilesetAlias::impl : public TilesetObserver {
if (codepoint >= static_cast<int>(local_map_.size())) {
local_map_.resize(codepoint + 1, -1);
}
+ if (local_map_.at(codepoint) >= 0) {
+ return 0; // Tile already assigned.
+ }
if (next_alias_index_ == capacity()) {
// Replace the current texture with a larger one.
texture_size_ *= 2;
|
Update targetHAL_Time.cpp
Fixes nanoframework/Home#257.
Now, with a time set internally to 12/17/2017 08:00:00,
`Console.WriteLine("utcNow : " + DateTime.UtcNow.ToString());`
is returning
`utcNow : 12/17/2017 08:00:39` (The 39 seconds are due to the manual startup time of the debug session after the board's reset)
|
@@ -36,7 +36,7 @@ signed __int64 HAL_Time_CurrentDateTime(bool datePartOnly)
st.wDay = (unsigned short) _dateTime.day;
st.wMonth = (unsigned short) _dateTime.month;
- st.wYear = (unsigned short) _dateTime.year;
+ st.wYear = (unsigned short) (_dateTime.year + 1980); // ChibiOS is counting years since 1980
st.wDayOfWeek = (unsigned short) _dateTime.dayofweek;
// zero 'time' fields if date part only is required
@@ -45,7 +45,7 @@ signed __int64 HAL_Time_CurrentDateTime(bool datePartOnly)
st.wMilliseconds = 0;
st.wSecond = 0;
st.wMinute = 0;
- st.wMinute = 0;
+ st.wHour = 0;
}
else
{
@@ -57,7 +57,7 @@ signed __int64 HAL_Time_CurrentDateTime(bool datePartOnly)
_dateTime.millisecond /= 60;
st.wMinute = (unsigned short) (_dateTime.millisecond % 60);
_dateTime.millisecond /= 60;
- st.wMinute = (unsigned short) (_dateTime.millisecond % 24);
+ st.wHour = (unsigned short) (_dateTime.millisecond % 24);
}
return HAL_Time_ConvertFromSystemTime( &st );
|
Fixed traffic secret labels according to NSS Key Log Format
|
@@ -4038,8 +4038,8 @@ static int update_traffic_key_cb(ptls_update_traffic_key_t *self, ptls_t *tls, i
ptls_aead_context_t **aead_slot;
int ret;
static const char *log_labels[2][4] = {
- {NULL, "QUIC_CLIENT_EARLY_TRAFFIC_SECRET", "QUIC_CLIENT_HANDSHAKE_TRAFFIC_SECRET", "QUIC_CLIENT_TRAFFIC_SECRET_0"},
- {NULL, NULL, "QUIC_SERVER_HANDSHAKE_TRAFFIC_SECRET", "QUIC_SERVER_TRAFFIC_SECRET_0"}};
+ {NULL, "CLIENT_EARLY_TRAFFIC_SECRET", "CLIENT_HANDSHAKE_TRAFFIC_SECRET", "CLIENT_TRAFFIC_SECRET_0"},
+ {NULL, NULL, "SERVER_HANDSHAKE_TRAFFIC_SECRET", "SERVER_TRAFFIC_SECRET_0"}};
const char *log_label = log_labels[ptls_is_server(tls) == is_enc][epoch];
QUICLY_PROBE(CRYPTO_UPDATE_SECRET, conn, conn->stash.now, is_enc, epoch, log_label,
|
merge also IPv4/IPv6 on option -p
|
@@ -1190,6 +1190,8 @@ while((pcapstatus = pcap_next_ex(pcapin, &pkh, &packet)) != -2)
llctype = be16toh(((llc_t*)payload)->type);
if(llctype == LLC_TYPE_IPV4)
{
+ if(pcapout != NULL)
+ pcap_dump((u_char *) pcapout, pkh, h80211);
if(pcapipv46out != NULL)
pcap_dump((u_char *) pcapipv46out, pkh, h80211);
ipv4flag = TRUE;
@@ -1197,6 +1199,8 @@ while((pcapstatus = pcap_next_ex(pcapin, &pkh, &packet)) != -2)
if(llctype == LLC_TYPE_IPV6)
{
+ if(pcapout != NULL)
+ pcap_dump((u_char *) pcapout, pkh, h80211);
if(pcapipv46out != NULL)
pcap_dump((u_char *) pcapipv46out, pkh, h80211);
ipv6flag = TRUE;
|
Added pin defines
|
@@ -9,6 +9,13 @@ namespace pimoroni {
//--------------------------------------------------
// Constants
//--------------------------------------------------
+ public:
+ static const uint8_t DEFAULT_CS_PIN = 17;
+ static const uint8_t DEFAULT_DC_PIN = 16;
+ static const uint8_t DEFAULT_SCK_PIN = 18;
+ static const uint8_t DEFAULT_MOSI_PIN = 19;
+ static const uint8_t DEFAULT_BL_PIN = 20;
+
private:
static const uint8_t ROWS = 162;
static const uint8_t COLS = 132;
@@ -43,12 +50,12 @@ namespace pimoroni {
uint32_t dma_channel;
// interface pins with our standard defaults where appropriate
- int8_t cs = 17;
- int8_t dc = 16;
- int8_t sck = 18;
- int8_t mosi = 19;
+ int8_t cs = DEFAULT_CS_PIN;
+ int8_t dc = DEFAULT_DC_PIN;
+ int8_t sck = DEFAULT_SCK_PIN;
+ int8_t mosi = DEFAULT_MOSI_PIN;
int8_t miso = -1; // we generally don't use this pin
- int8_t bl = 20;
+ int8_t bl = DEFAULT_BL_PIN;
int8_t vsync = -1; // only available on some products
uint32_t spi_baud = 30 * 1024 * 1024;
@@ -82,8 +89,7 @@ namespace pimoroni {
spi_inst_t *spi,
uint8_t cs, uint8_t dc, uint8_t sck, uint8_t mosi, uint8_t miso = -1, uint8_t bl = -1) :
width(width), height(height), frame_buffer(frame_buffer),
- spi(spi),
- cs(cs), dc(dc), sck(sck), mosi(mosi), miso(miso), bl(bl) {}
+ spi(spi), cs(cs), dc(dc), sck(sck), mosi(mosi), miso(miso), bl(bl) {}
//--------------------------------------------------
|
memb: update doc string
|
@@ -104,14 +104,14 @@ struct memb {
/**
* Initialize a memory block that was declared with MEMB().
*
- * \param m A memory block previously declared with MEMB().
+ * \param m A set of memory blocks previously declared with MEMB().
*/
void memb_init(struct memb *m);
/**
* Allocate a memory block from a block of memory declared with MEMB().
*
- * \param m A memory block previously declared with MEMB().
+ * \param m A set of memory blocks previously declared with MEMB().
*/
void *memb_alloc(struct memb *m);
@@ -119,7 +119,7 @@ void *memb_alloc(struct memb *m);
* Deallocate a memory block from a memory block previously declared
* with MEMB().
*
- * \param m m A memory block previously declared with MEMB().
+ * \param m m A set of memory blocks previously declared with MEMB().
*
* \param ptr A pointer to the memory block that is to be deallocated.
*
@@ -128,8 +128,25 @@ void *memb_alloc(struct memb *m);
*/
int memb_free(struct memb *m, void *ptr);
+/**
+ * Check if a given address is within a memory area previously
+ * declared with MEMB().
+ *
+ * \param m m A set of memory blocks previously declared with MEMB().
+ *
+ * \param ptr A pointer to the address to check
+ *
+ * \return 1 if the address is part of the memory block; otherwise 0
+ */
int memb_inmemb(struct memb *m, void *ptr);
+/**
+ * Count free memory blocks
+ *
+ * \param m m A set of memory blocks previously declared with MEMB().
+ *
+ * \return the number of free (available) memory blocks
+ */
int memb_numfree(struct memb *m);
/** @} */
|
Remove dependency on spnlock
|
@@ -8,8 +8,6 @@ Feel free to copy, use and enjoy according to the license provided.
#ifndef H_FIOBJ_TYPES_INTERNAL_H
#define H_FIOBJ_TYPES_INTERNAL_H
-#include "spnlock.inc"
-
#include "fiobj.h"
#include <math.h>
@@ -18,6 +16,42 @@ Feel free to copy, use and enjoy according to the license provided.
#include <string.h>
#include <unistd.h>
+/* *****************************************************************************
+Atomic add / subtract
+***************************************************************************** */
+
+/* Select the correct compiler builtin method. */
+#if defined(__has_builtin)
+
+#if __has_builtin(__atomic_exchange_n)
+#define SPN_LOCK_BUILTIN(...) __atomic_exchange_n(__VA_ARGS__, __ATOMIC_ACQ_REL)
+/** An atomic addition operation */
+#define spn_add(...) __atomic_add_fetch(__VA_ARGS__, __ATOMIC_ACQ_REL)
+/** An atomic subtraction operation */
+#define spn_sub(...) __atomic_sub_fetch(__VA_ARGS__, __ATOMIC_ACQ_REL)
+
+#elif __has_builtin(__sync_fetch_and_or)
+#define SPN_LOCK_BUILTIN(...) __sync_fetch_and_or(__VA_ARGS__)
+/** An atomic addition operation */
+#define spn_add(...) __sync_add_and_fetch(__VA_ARGS__)
+/** An atomic subtraction operation */
+#define spn_sub(...) __sync_sub_and_fetch(__VA_ARGS__)
+
+#else
+#error Required builtin "__sync_swap" or "__sync_fetch_and_or" missing from compiler.
+#endif /* defined(__has_builtin) */
+
+#elif __GNUC__ > 3
+#define SPN_LOCK_BUILTIN(...) __sync_fetch_and_or(__VA_ARGS__)
+/** An atomic addition operation */
+#define spn_add(...) __sync_add_and_fetch(__VA_ARGS__)
+/** An atomic subtraction operation */
+#define spn_sub(...) __sync_sub_and_fetch(__VA_ARGS__)
+
+#else
+#error Required builtin "__sync_swap" or "__sync_fetch_and_or" not found.
+#endif
+
/* *****************************************************************************
Simple List - I will slowly move any external dependencies to allow independance
***************************************************************************** */
|
remove scaling from looklocker
|
@@ -41,7 +41,6 @@ int main_looklocker(int argc, char* argv[argc])
};
float threshold = 0.2;
- float scaling_M0 = 2.0;
float Td = 0.;
const struct opt_s opts[] = {
@@ -76,7 +75,7 @@ int main_looklocker(int argc, char* argv[argc])
complex float M0 = MD_ACCESS(DIMS, istrs, (pos[COEFF_DIM] = 1, pos), in_data);
complex float R1s = MD_ACCESS(DIMS, istrs, (pos[COEFF_DIM] = 2, pos), in_data);
- float T1 = scaling_M0 * cabs(M0) / (cabs(Ms) * cabs(R1s)) + 2. * Td;
+ float T1 = cabs(M0) / (cabs(Ms) * cabs(R1s)) + 2. * Td;
if (safe_isnanf(T1) || (cabs(Ms) < threshold))
T1 = 0.;
|
fix actuator.js
|
@@ -188,7 +188,7 @@ Blockly.Python.servo_move = function() {
'\n';
Blockly.Python.setups_['mixly_servo_write_angle']=
- 'def mixly_write_angle(pin,ang,delay):\n'+
+ 'def mixly_servo_write_angle(pin,ang,delay):\n'+
' Servo(pin).write_angle(ang)\n'+
' sleep(delay)\n';
var dropdown_pin = Blockly.Python.valueToCode(this, 'PIN',Blockly.Python.ORDER_ATOMIC);
|
Use the first matching sigalg
Previously we iterated thru the entire list. Short circuit and choose
the first match from the preference list.
|
@@ -68,6 +68,7 @@ int s2n_set_signature_hash_pair_from_preference_list(struct s2n_connection *conn
if (s2n_sig_hash_alg_pairs_get(sig_hash_algs, sig_alg_chosen, s2n_preferred_hashes[i]) == 1) {
/* Just set hash_alg_chosen because sig_alg_chosen was set above based on cert type */
hash_alg_chosen = s2n_hash_tls_to_alg[s2n_preferred_hashes[i]];
+ break;
}
}
|
backup dma: force clear reset signal to fix the backup dma operation failure caused by RTC_SW_CPU_RST
|
@@ -298,6 +298,11 @@ __attribute__((weak)) void esp_perip_clk_init(void)
CLEAR_PERI_REG_MASK(SYSTEM_PERIP_CLK_EN1_REG, hwcrypto_perip_clk);
SET_PERI_REG_MASK(SYSTEM_PERIP_RST_EN1_REG, hwcrypto_perip_clk);
+ /* Force clear backup dma reset signal. This is a fix to the backup dma
+ * implementation in the ROM, the reset signal was not cleared when the
+ * backup dma was started, which caused the backup dma operation to fail. */
+ CLEAR_PERI_REG_MASK(SYSTEM_PERIP_RST_EN1_REG, SYSTEM_PERI_BACKUP_RST);
+
/* Disable WiFi/BT/SDIO clocks. */
CLEAR_PERI_REG_MASK(SYSTEM_WIFI_CLK_EN_REG, wifi_bt_sdio_clk);
SET_PERI_REG_MASK(SYSTEM_WIFI_CLK_EN_REG, SYSTEM_WIFI_CLK_EN);
|
add help hotkey
|
@@ -126,6 +126,7 @@ static const char *nautiluscmd[] = {"nautilus", NULL};
static const char *slockcmd[] = {"ilock", NULL};
static const char *oslockcmd[] = {"instantlock", "-o", NULL};
static const char *slockmcmd[] = {"ilock", "message", NULL};
+static const char *helpcmd[] = {"urxvt", "-e", "instanthotkeys", NULL};
static const char *instantswitchcmd[] = {"rofi", "-show", "window", "-kb-row-down", "Alt+Tab,Down", "-kb-row-up", "Alt+Ctrl+Tab,Up", "-kb-accept-entry", "!Alt_L,!Alt+Tab,Return", "-me-select-entry", "", "-me-accept-entry", "MousePrimary", NULL};
static const char *caretinstantswitchcmd[] = {"rofi", "-show", "window", "-kb-row-down", "Alt+Tab,Down", "-kb-row-up", "Alt+Ctrl+Tab,Up", "-kb-accept-entry", "!Alt_L,!Alt+Tab,Return", "-me-select-entry", "", "-me-accept-entry", "MousePrimary", "-theme", "/usr/share/instantdotfiles/rofi/appmenu.rasi", NULL};
static const char *onboardcmd[] = {"onboard", NULL};
@@ -229,6 +230,7 @@ static Key keys[] = {
{MODKEY, XK_q, killclient, {0}},
{MODKEY|ShiftMask, XK_c, killclient, {0}},
{Mod1Mask, XK_F4, killclient, {0}},
+ {MODKEY, XK_F1, spawn, {.v = helpcmd}},
{MODKEY, XK_t, setlayout, {.v = &layouts[0]}},
{MODKEY, XK_f, setlayout, {.v = &layouts[2]}},
{MODKEY, XK_m, setlayout, {.v = &layouts[3]}},
|
metrics: silent gcc warning
|
@@ -324,8 +324,7 @@ int flb_metrics_fluentbit_add(struct flb_config *ctx, struct cmt *cmt)
/* get hostname */
ret = gethostname(hostname, sizeof(hostname) - 1);
if (ret == -1) {
- strncpy(hostname, "unknown", 7);
- hostname[7] = '\0';
+ strcpy(hostname, "unknown");
}
/* Attach metrics to cmetrics context */
|
Update README.md
Hint to later esp-idf version and name change for TINYPICO board
|
@@ -180,7 +180,7 @@ Beginning with version 1.15, `micropython` switched to `cmake` on the ESP32 port
In case you encounter difficulties during the build process, you can consult the (general instructions for the ESP32)[https://github.com/micropython/micropython/tree/master/ports/esp32#micropython-port-to-the-esp32].
-Frist, clone the `ulab`, the `micropython`, as well as the `espressif` repositories:
+First, clone the `ulab`, the `micropython`, as well as the `espressif` repositories:
```bash
export BUILD_DIR=$(pwd)
@@ -193,6 +193,7 @@ cd $BUILD_DIR/micropython/
git clone -b v4.0.2 --recursive https://github.com/espressif/esp-idf.git
```
+Also later releases of `esp-idf` are possible (e.g. `v4.2.1`).
Then install the `ESP-IDF` tools:
@@ -218,7 +219,7 @@ USER_C_MODULES = $(BUILD_DIR)/ulab/code/micropython.cmake
include Makefile
```
-You specify with the `BOARD` variable, what you want to compile for, a generic board, or `TINYPICO`, etc. Still in `$BUILD_DIR/micropython/ports/esp32`, you can now run `make`.
+You specify with the `BOARD` variable, what you want to compile for, a generic board, or `TINYPICO` (for `micropython` version >1.1.5, use `UM_TINYPICO`), etc. Still in `$BUILD_DIR/micropython/ports/esp32`, you can now run `make`.
#### Compiling with make
|
[docs] - Add line breaks in SOURCEINSTALL.md
|
@@ -64,11 +64,11 @@ There is a "list" option on the clone\_aomp.sh that provides useful information
```
$AOMP_REPOS/aomp/bin/clone_aomp.sh list
```
-The above command will produce output like this showing you the location and branch of the repos in the AOMP\_REPOS directory and if there are any discrepencies with respect to the manifest file.
-<b>Development Branch:</b>
+The above command will produce output like this showing you the location and branch of the repos in the AOMP\_REPOS directory and if there are any discrepencies with respect to the manifest file.<br>
+<b>Development Branch:</b><br>
MANIFEST FILE: ~/git/aomp16.0/aomp/bin/../manifests/aomp_16.0.xml
-<b>Release Branch:</b>
+<b>Release Branch:</b><br>
MANIFEST FILE: ~/git/aomp15.0/aomp/bin/../manifests/aomp_15.0.xml
```
repo src branch path repo name last hash updated commitor for author
|
Use standard copyright message
|
/** @brief The version header. */
static const char *astcenc_copyright_string =
R"(astcenc v%s, %u-bit %s%s%s
-Copyright 2011-%s Arm Limited, all rights reserved
+Copyright (c) 2011-%s Arm Limited. All rights reserved.
)";
/** @brief The short-form help text. */
|
Use assigned workspace name for output
Instead of relying on bindings being configured, primarily source
new workspace names from workspace-output assignments.
Fixes
|
@@ -120,6 +120,8 @@ static void workspace_name_from_binding(const struct sway_binding * binding,
name = argsep(&cmdlist, ",;");
}
+ // TODO: support "move container to workspace" bindings as well
+
if (strcmp("workspace", cmd) == 0 && name) {
char *_target = strdup(name);
_target = do_var_replacement(_target);
@@ -189,8 +191,8 @@ static void workspace_name_from_binding(const struct sway_binding * binding,
char *workspace_next_name(const char *output_name) {
wlr_log(WLR_DEBUG, "Workspace: Generating new workspace name for output %s",
output_name);
- // Scan all workspace bindings to find the next available workspace name,
- // if none are found/available then default to a number
+ // Scan for available workspace names by looking through output-workspace
+ // assignments primarily, falling back to bindings and numbers.
struct sway_mode *mode = config->current_mode;
int order = INT_MAX;
@@ -203,6 +205,15 @@ char *workspace_next_name(const char *output_name) {
workspace_name_from_binding(mode->keycode_bindings->items[i],
output_name, &order, &target);
}
+ for (int i = 0; i < config->workspace_outputs->length; ++i) {
+ // Unlike with bindings, this does not guarantee order
+ const struct workspace_output *wso = config->workspace_outputs->items[i];
+ if (strcmp(wso->output, output_name) == 0
+ && workspace_by_name(wso->workspace) == NULL) {
+ free(target);
+ target = strdup(wso->workspace);
+ }
+ }
if (target != NULL) {
return target;
}
|
travis: workaround $ANSI_RED environment changes in Ubuntu host
* spec/posix_stdilb_spec.yaml (getenv): replace live ANSI escape
characters with '^' to prevent terminal from intercepting them.
|
@@ -26,10 +26,11 @@ specify posix.stdlib:
- it fetches a table of process environment variables: |
volatile = { _=true, CWD=true, LUA_PATH=true, PWD=true, SHLVL=true, }
+ ESC = string.char(27)
for k,v in pairs(getenv()) do
if not volatile[k] then
- expect(hell.spawn('echo "' .. k .. '=$' .. k .. '"')).
- to_contain_output(k.."="..v)
+ expect(hell.spawn('echo "' .. k .. '=$' .. k .. '" | tr "' .. ESC .. '" "^"')).
+ to_contain_output(k .. "=" .. string.gsub(v, '\\033', '^'))
end
end
- it fetches a named process environment variable:
|
sysdeps/linux: guard sys_reboot behind the linux option
|
#include <errno.h>
#include <limits.h>
-#include <linux/reboot.h>
#include <type_traits>
@@ -749,13 +748,6 @@ int sys_msync(void *addr, size_t length, int flags) {
return 0;
}
-int sys_reboot(int cmd) {
- auto ret = do_syscall(SYS_reboot, LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2, cmd, nullptr);
- if (int e = sc_error(ret); e)
- return e;
- return 0;
-}
-
int sys_getaffinity(pid_t pid, size_t cpusetsize, cpu_set_t *mask) {
auto ret = do_syscall(SYS_sched_getaffinity, pid, cpusetsize, mask);
if (int e = sc_error(ret); e)
@@ -1035,6 +1027,19 @@ int sys_if_nametoindex(const char *name, unsigned int *ret) {
#endif // __MLIBC_POSIX_OPTION
+#if __MLIBC_LINUX_OPTION
+
+#include <linux/reboot.h>
+
+int sys_reboot(int cmd) {
+ auto ret = do_syscall(SYS_reboot, LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2, cmd, nullptr);
+ if (int e = sc_error(ret); e)
+ return e;
+ return 0;
+}
+
+#endif // __MLIBC_LINUX_OPTION
+
int sys_times(struct tms *tms, clock_t *out) {
auto ret = do_syscall(SYS_times, tms);
if (int e = sc_error(ret); e)
|
Increase MLX frame readout retry.
|
@@ -64,7 +64,7 @@ int MLX90640_GetFrameData(uint8_t slaveAddr, uint16_t *frameData)
dataReady = statusRegister & 0x0008;
}
- while(dataReady != 0 && cnt < 5)
+ while(dataReady != 0 && cnt < 32)
{
error = MLX90640_I2CWrite(slaveAddr, 0x8000, 0x0030);
if(error == -1)
@@ -87,7 +87,7 @@ int MLX90640_GetFrameData(uint8_t slaveAddr, uint16_t *frameData)
cnt = cnt + 1;
}
- if(cnt > 4)
+ if(cnt > 31)
{
return -8;
}
|
Raise share page size
|
@@ -134,7 +134,7 @@ namespace MiningCore.Payments.PayoutSchemes
Dictionary<string, double> shares, Dictionary<string, decimal> rewards)
{
var done = false;
- var pageSize = 3000;
+ var pageSize = 5000;
var currentPage = 0;
var accumulatedScore = 0.0m;
var blockRewardRemaining = blockReward;
|
Source: Stop, then unqueue buffers
Doing it the other way around is illegal; you may not unqueue unprocessed buffers, so we need to stop first.
|
@@ -281,15 +281,15 @@ void lovrSourceStop(Source* source) {
case SOURCE_STREAM: {
+ // Stop the source
+ alSourceStop(source->id);
+ alSourcei(source->id, AL_BUFFER, AL_NONE);
+
// Empty the buffers
int count = 0;
alGetSourcei(source->id, AL_BUFFERS_QUEUED, &count);
alSourceUnqueueBuffers(source->id, count, NULL);
- // Stop the source
- alSourceStop(source->id);
- alSourcei(source->id, AL_BUFFER, AL_NONE);
-
// Rewind the decoder
if (!lovrAudioStreamIsRaw(source->stream)) {
lovrAudioStreamRewind(source->stream);
|
Try logging into the registry first.
|
@@ -26,6 +26,8 @@ jobs:
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
+ - name: Log into registry
+ run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login docker.pkg.github.com -u ${{ github.actor }} --password-stdin
- name: West Init
uses: 'docker://docker.pkg.github.com/zmkfirmware/zephyr-west-action/zephyr-west-action:latest'
id: west-init
|
peview: Fix options change restart
|
@@ -99,22 +99,31 @@ BOOLEAN PvShellExecuteRestart(
_In_opt_ HWND WindowHandle
)
{
+ static PH_STRINGREF seperator = PH_STRINGREF_INIT(L"\"");
BOOLEAN result;
PPH_STRING filename;
+ PPH_STRING parameters;
if (!(filename = PhGetApplicationFileName()))
return FALSE;
+ parameters = PhConcatStringRef3(
+ &seperator,
+ &PvFileName->sr,
+ &seperator
+ );
+
result = PhShellExecuteEx(
WindowHandle,
PhGetString(filename),
- PhGetString(PvFileName),
+ PhGetString(parameters),
SW_SHOW,
0,
0,
NULL
);
+ PhDereferenceObject(parameters);
PhDereferenceObject(filename);
return result;
|
fix bug in zscal function
memset can not be used in zscal because of
the stride parameters.
|
@@ -35,6 +35,7 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define VFMACCVF_FLOAT vfmacc_vf_f32m4
#define VFMULVF_FLOAT vfmul_vf_f32m4
#define VFNMSACVF_FLOAT vfnmsac_vf_f32m4
+#define VFMVVF_FLOAT vfmv_v_f_f32m4
#else
#define VSETVL(n) vsetvl_e64m4(n)
#define VSETVL_MAX vsetvlmax_e64m1()
@@ -44,6 +45,7 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define VFMACCVF_FLOAT vfmacc_vf_f64m4
#define VFMULVF_FLOAT vfmul_vf_f64m4
#define VFNMSACVF_FLOAT vfnmsac_vf_f64m4
+#define VFMVVF_FLOAT vfmv_v_f_f64m4
#endif
int CNAME(BLASLONG n, BLASLONG dummy0, BLASLONG dummy1, FLOAT da_r,FLOAT da_i, FLOAT *x, BLASLONG inc_x, FLOAT *y, BLASLONG inc_y, FLOAT *dummy, BLASLONG dummy2)
@@ -58,7 +60,26 @@ int CNAME(BLASLONG n, BLASLONG dummy0, BLASLONG dummy1, FLOAT da_r,FLOAT da_i, F
unsigned int gvl = 0;
FLOAT_V_T vt, v0, v1;
if(da_r == 0.0 && da_i == 0.0){
- memset(&x[0], 0, n * 2 * sizeof(FLOAT));
+ gvl = VSETVL(n);
+ BLASLONG stride_x = inc_x * 2 * sizeof(FLOAT);
+ BLASLONG inc_xv = inc_x * 2 * gvl;
+ vt = VFMVVF_FLOAT(0.0, gvl);
+ for(i=0,j=0; i < n/(gvl*2); i++){
+ VSSEV_FLOAT(&x[ix], stride_x, vt, gvl);
+ VSSEV_FLOAT(&x[ix+1], stride_x, vt, gvl);
+ VSSEV_FLOAT(&x[ix+inc_xv], stride_x, vt, gvl);
+ VSSEV_FLOAT(&x[ix+inc_xv+1], stride_x, vt, gvl);
+
+ j += gvl*2;
+ ix += inc_xv*2;
+ }
+ for(; j < n; ){
+ gvl = VSETVL(n-j);
+ VSSEV_FLOAT(&x[ix], stride_x, vt, gvl);
+ VSSEV_FLOAT(&x[ix+1], stride_x, vt, gvl);
+ j += gvl;
+ ix += inc_x * 2 * gvl;
+ }
}else if(da_r == 0.0){
gvl = VSETVL(n);
BLASLONG stride_x = inc_x * 2 * sizeof(FLOAT);
|
Update README.md with Emscripten instructions
Emscripten is pretty low on our priority list at the moment, but we'd love to get a web UI back some time in the future.
In the mean time you can enjoy sharing your games via the web thanks to
|
@@ -167,6 +167,32 @@ And then `make` as normal.
The result of your build will be a `.bin`, `.hex`, `.elf` and DfuSe-compatible `.dfu` file.
+### Building & Running For Web (Emscripten)
+
+Building in Emscripten - asm.js/WebAssembly - works on Linux and WSL.
+
+You will need to install the emscripten compiler. See https://emscripten.org/docs/getting_started/downloads.html for complete instructions, but generally you should just browse to your desired directory and:
+
+```
+git clone https://github.com/emscripten-core/emsdk.git
+cd emsdk
+./emsdk install latest
+./emsdk activate latest
+source ./emsdk_env.sh
+```
+
+You should now have commands like `emcc` in your path, and an `EMSDK` environment variable set ready to build your project.
+
+In your project directory:
+
+``` shell
+mkdir build.em
+cmake .. -DCMAKE_TOOLCHAIN_FILE=$EMSDK/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake -G "Unix Makefiles"
+make
+python3 -m http.server
+```
+Finally, open the URL given by Python's HTTP server in your browser and open your project's .html file.
+
### Video Capture
`32blit-sdl` supports optional FFMPEG video capture, which you can enable by grabbing a FFMPEG snapshot, building it, and turning on `ENABLE_FFMPEG` when building your project.
|
esp32c3: Updates a description in Kconfig about Universal MAC Address strategy
|
@@ -30,15 +30,18 @@ menu "ESP32C3-Specific"
Configure the number of universally administered (by IEEE) MAC addresses.
During initialization, MAC addresses for each network interface are generated or derived from a
single base MAC address.
- If the number of universal MAC addresses is Two, all interfaces (WiFi station, WiFi softap) receive a
- universally administered MAC address. They are generated sequentially by adding 0, and 1 (respectively)
- to the final octet of the base MAC address. If the number of universal MAC addresses is one,
- only WiFi station receives a universally administered MAC address.
- It's generated by adding 0 to the base MAC address.
- The WiFi softap receives local MAC addresses. It's derived from the universal WiFi station MAC addresses.
+ - If the number of universal MAC addresses is Three, all interfaces (WiFi station, WiFi softap
+ and Bluetooth) receive a universally administered MAC address. They are generated sequentially by adding
+ 0, 1 and 2 (respectively) to the final octet of the base MAC address. The remaining one interface
+ (Ethernet) receives local MAC addresses which is derived from the universal WiFi softap MAC.
+ - If the number of universal MAC addresses is Two, only two interfaces (WiFi station and Bluetooth)
+ receive a universally administered MAC address. These are generated sequentially by adding 0
+ and 1 (respectively) to the base MAC address. The remaining two interfaces (WiFi softap and Ethernet)
+ receive local MAC addresses. These are derived from the universal WiFi station and Bluetooth MAC
+ addresses, respectively.
When using the default (Espressif-assigned) base MAC address, either setting can be used. When using
a custom universal MAC address range, the correct setting will depend on the allocation of MAC
- addresses in this range (either 1 or 2 per device.)
+ addresses in this range (either 2 or 3 per device.)
config ESP32C3_UNIVERSAL_MAC_ADDRESSES_TWO
bool "Two"
|
print out what it is in case of not being a string
|
@@ -53,6 +53,19 @@ struct extractor_specifier {
};
+static char*
+print_token(jsmntype_t type)
+{
+ switch (type) {
+ case JSMN_UNDEFINED: return "undefined";
+ case JSMN_OBJECT: return "object";
+ case JSMN_ARRAY: return "array";
+ case JSMN_STRING: return "string";
+ case JSMN_PRIMITIVE: return "primitive";
+ default: ERROR("Unknown JSMN_XXXX type encountered (code: %d)", type);
+ }
+}
+
static int
jsoneq(const char *json, jsmntok_t *tok, const char *str)
{
@@ -209,16 +222,21 @@ type_error:
}
static void
-apply(char *test_string, jsmntok_t *tok, size_t n_toks, struct extractor_specifier *es)
+apply(char *str, jsmntok_t *tok, size_t n_toks, struct extractor_specifier *es)
{
size_t ik = 1, iv = 2;
do {
// tok[ik] must be a toplevel key, and tok[iv] must be its value
+ if (tok[ik].type != JSMN_STRING) {
+ D_PRINT("[%d][p:%d][size:%d]%s (%.*s)\n", ik, tok[ik].parent,
+ tok[ik].size, print_token(tok[ik].type),
+ tok[ik].end - tok[ik].start, str + tok[ik].start);
+ }
ASSERT_S(tok[ik].type == JSMN_STRING, "Not a key"); // make sure it's a key
ASSERT_S(tok[ik].parent == 0, "Token is not at top level"); // make sure it's at the toplevel
- if (0 == jsoneq(test_string, &tok[ik], es->path_specifiers[0].key)) {
- match_path(test_string, tok, n_toks, iv, es, es->path_specifiers[0].next);
+ if (0 == jsoneq(str, &tok[ik], es->path_specifiers[0].key)) {
+ match_path(str, tok, n_toks, iv, es, es->path_specifiers[0].next);
break;
}
@@ -424,19 +442,6 @@ format_parse(char *format, size_t *n)
return parse_extractor_specifiers(format, *n);
}
-static char*
-print_token(jsmntype_t type)
-{
- switch (type) {
- case JSMN_UNDEFINED: return "undefined";
- case JSMN_OBJECT: return "object";
- case JSMN_ARRAY: return "array";
- case JSMN_STRING: return "string";
- case JSMN_PRIMITIVE: return "primitive";
- default: ERROR("Unknown JSMN_XXXX type encountered (code: %d)", type);
- }
-}
-
/*
* format grammar:
* ([key1]|[<n>])+%(d|ld|lld|f|lf|b|<n>s|<n>S) <space>
|
opal-prd: Handle SBE passthrough message passing
This patch adds support to send SBE pass through command to HBRT.
HBRT interface details provided by Daniel M. Crowell (<dcrowell@us.ibm.com>).
CC: Daniel M Crowell
CC: Jeremy Kerr
|
@@ -281,6 +281,7 @@ extern int call_mfg_htmgt_pass_thru(uint16_t i_cmdLength, uint8_t *i_cmdData,
uint16_t *o_rspLength, uint8_t *o_rspData);
extern int call_apply_attr_override(uint8_t *i_data, size_t size);
extern int call_run_command(int argc, const char **argv, char **o_outString);
+extern int call_sbe_message_passing(uint32_t i_chipId);
extern uint64_t call_get_ipoll_events(void);
extern int call_firmware_notify(uint64_t len, void *data);
extern int call_reset_pm_complex(uint64_t chip);
@@ -1388,6 +1389,26 @@ static int handle_msg_firmware_notify(struct opal_prd_ctx *ctx,
return 0;
}
+static int handle_msg_sbe_passthrough(struct opal_prd_ctx *ctx,
+ struct opal_prd_msg *msg)
+{
+ uint32_t proc;
+ int rc;
+
+ proc = be64toh(msg->sbe_passthrough.chip);
+
+ pr_debug("FW: firmware sent SBE pass through command for proc 0x%x\n",
+ proc);
+
+ if (!hservice_runtime->sbe_message_passing) {
+ pr_log_nocall("sbe_message_passing");
+ return -1;
+ }
+
+ rc = call_sbe_message_passing(proc);
+ return rc;
+}
+
static int handle_prd_msg(struct opal_prd_ctx *ctx, struct opal_prd_msg *msg)
{
int rc = -1;
@@ -1405,6 +1426,9 @@ static int handle_prd_msg(struct opal_prd_ctx *ctx, struct opal_prd_msg *msg)
case OPAL_PRD_MSG_TYPE_FIRMWARE_NOTIFY:
rc = handle_msg_firmware_notify(ctx, msg);
break;
+ case OPAL_PRD_MSG_TYPE_SBE_PASSTHROUGH:
+ rc = handle_msg_sbe_passthrough(ctx, msg);
+ break;
default:
pr_log(LOG_WARNING, "Invalid incoming message type 0x%x",
msg->hdr.type);
|
OcFileLib: Change "Located cached partition entry/entries" messages from INFO to VERBOSE, since now used much more often with boot entry protocol and are basically spamming the logs
|
@@ -409,7 +409,7 @@ OcGetDiskPartitions (
(VOID **) &PartEntries
);
if (!EFI_ERROR (Status)) {
- DEBUG ((DEBUG_INFO, "OCPI: Located cached partition entries\n"));
+ DEBUG ((DEBUG_VERBOSE, "OCPI: Located cached partition entries\n"));
return PartEntries;
}
@@ -561,7 +561,7 @@ OcGetGptPartitionEntry (
(VOID **)&PartEntry
);
if (!EFI_ERROR (Status)) {
- DEBUG ((DEBUG_INFO, "OCPI: Located cached partition entry\n"));
+ DEBUG ((DEBUG_VERBOSE, "OCPI: Located cached partition entry\n"));
return PartEntry;
}
//
|
Perltidy ck_errf
|
# perl util/ck_errf.pl */*.c */*/*.c
#
+use strict;
+use warnings;
+
my $err_strict = 0;
my $bad = 0;
-foreach $file (@ARGV)
- {
- if ($file eq "-strict")
- {
+foreach my $file (@ARGV) {
+ if ( $file eq "-strict" ) {
$err_strict = 1;
next;
}
- open(IN,"<$file") || die "unable to open $file\n";
- $func="";
- while (<IN>)
- {
- if (!/;$/ && /^\**([a-zA-Z_].*[\s*])?([A-Za-z_0-9]+)\(.*([),]|$)/)
- {
+ open( IN, "<$file" ) || die "Can't open $file, $!";
+ my $func = "";
+ while (<IN>) {
+ if ( !/;$/ && /^\**([a-zA-Z_].*[\s*])?([A-Za-z_0-9]+)\(.*([),]|$)/ ) {
/^([^()]*(\([^()]*\)[^()]*)*)\(/;
$1 =~ /([A-Za-z_0-9]*)$/;
$func = $1;
$func =~ tr/A-Z/a-z/;
}
- if (/([A-Z0-9]+)err\(([^,]+)/ && ! /ckerr_ignore/)
- {
- $errlib=$1;
- $n=$2;
+ if ( /([A-Z0-9]+)err\(([^,]+)/ && !/ckerr_ignore/ ) {
+ my $errlib = $1;
+ my $n = $2;
- if ($func eq "")
- { print "$file:$.:???:$n\n"; $bad = 1; next; }
+ if ( $func eq "" ) {
+ print "$file:$.:???:$n\n";
+ $bad = 1;
+ next;
+ }
- if ($n !~ /([^_]+)_F_(.+)$/)
- {
+ if ( $n !~ /([^_]+)_F_(.+)$/ ) {
#print "check -$file:$.:$func:$n\n";
next;
}
- $lib=$1;
+ my $lib = $1;
$n = $2;
- if ($lib ne $errlib)
- { print "$file:$.:$func:$n [${errlib}err]\n"; $bad = 1; next; }
+ if ( $lib ne $errlib ) {
+ print "$file:$.:$func:$n [${errlib}err]\n";
+ $bad = 1;
+ next;
+ }
$n =~ tr/A-Z/a-z/;
- if (($n ne $func) && ($errlib ne "SYS"))
- { print "$file:$.:$func:$n\n"; $bad = 1; next; }
+ if ( $n ne $func && $errlib ne "SYS" ) {
+ print "$file:$.:$func:$n\n";
+ $bad = 1;
+ next;
+ }
+
# print "$func:$1\n";
}
}
close(IN);
}
-if ($bad && $err_strict)
- {
+if ( $bad && $err_strict ) {
print STDERR "FATAL: error discrepancy\n";
exit 1;
}
-
|
Fix default hostname on macOS - current versions of macOS use new ".lan" domain
for mDNS instead of ".local", which causes the IPP Everywhere self-certification
tests to fail.
|
@@ -1712,17 +1712,21 @@ create_printer(
}
else
{
- char temp[1024]; /* Temporary string */
+ char temp[1024], /* Temporary string */
+ *tempptr; /* Pointer into temporary string */
#ifdef HAVE_AVAHI
const char *avahi_name = avahi_client_get_host_name_fqdn(DNSSDClient);
if (avahi_name)
- printer->hostname = strdup(avahi_name);
+ strlcpy(temp, avahi_name, sizeof(temp));
else
#endif /* HAVE_AVAHI */
- printer->hostname = strdup(httpGetHostname(NULL, temp, sizeof(temp)));
+ if ((tempptr = strstr(httpGetHostname(NULL, temp, sizeof(temp)), ".lan")) != NULL && !tempptr[5])
+ strlcpy(tempptr, ".local", sizeof(temp) - (size_t)(tempptr - temp));
+
+ printer->hostname = strdup(temp);
}
_cupsRWInit(&(printer->rwlock));
|
Initial commit of only 565 to 888; will check others next
|
@@ -305,9 +305,14 @@ static inline uint32_t lv_color_to32(lv_color_t color)
#elif LV_COLOR_DEPTH == 16
#if LV_COLOR_16_SWAP == 0
lv_color32_t ret;
- ret.ch.red = color.ch.red * 8; /*(2^8 - 1)/(2^5 - 1) = 255/31 = 8*/
- ret.ch.green = color.ch.green * 4; /*(2^8 - 1)/(2^6 - 1) = 255/63 = 4*/
- ret.ch.blue = color.ch.blue * 8; /*(2^8 - 1)/(2^5 - 1) = 255/31 = 8*/
+ /**
+ * Per https://docs.google.com/spreadsheets/d/1PppX8FJpddauAPasHwlNgIPGIuPGPNvRbhilIQ8w-7g/edit#gid=0
+ * Truly any of the listed multipliers and adders would work.
+ * The below numbers seem the most precise.
+ */
+ ret.ch.red = ( color.ch.red * 33 - 3 ) >> 2;
+ ret.ch.green = ( color.ch.green * 4 + 3 );
+ ret.ch.blue = ( color.ch.blue * 33 - 3 ) >> 2;
ret.ch.alpha = 0xFF;
return ret.full;
#else
|
globbing: update documentation
|
@@ -82,6 +82,8 @@ static int checkElektraExtensions (const char * name, const char * pattern)
/**
* @brief checks whether a given Key matches a given globbing pattern
*
+ * WARNING: this method will not work correctly, if key parts contain embedded (escaped) slashes.
+ *
* The globbing patterns for this function are a superset of those from glob(7)
* used with the FNM_PATHNAME flag:
* <ul>
|
run_test: python 3 compatibility issue
|
@@ -80,7 +80,7 @@ class SerialTester(object):
def __exit__(self, exception_type, value, traceback):
self._queue.put(None)
self._write_thread.join(ERROR_TIMEOUT_SECONDS)
- assert not self._write_thread.isAlive(), "Thread join failed"
+ assert not self._write_thread.is_alive(), "Thread join failed"
self.raw_serial.close()
self.raw_serial = None
return False
|
Add a worked example of the GIF file format.
|
@@ -23,7 +23,11 @@ pub func lzw_decoder.decode?(dst writer1, src reader1)() {
var end_code u32[5..257] = clear_code + 1
// These variables do change.
- var save_code u32[..4096] = end_code // 4096 means do not save.
+ //
+ // save_code is the code for which, after decoding a code, we save what the
+ // next back-reference expands to. The README.md file also calls this value
+ // `max`. 4096 means do not save.
+ var save_code u32[..4096] = end_code
var prev_code u32[..4095]
var width u32[..12] = this.literal_width + 1
|
improves error handling in +sigh-tang
|
|= [=wire =tang]
^- (quip move _this)
?> ?=([%acme ^] wire)
- :: XX log crashes above some threshold?
+ :: XX may God forgive me for this
::
- abet:(retry:event t.wire)
+ =< abet
+ =- ?:(?=(%& -.-) p.- this)
+ %- mule |.
+ (retry:event t.wire)
:: +sigh-recoverable-error: handle http rate-limit response
::
++ sigh-recoverable-error
|
Fix THREAD_UMS_INFORMATION type
|
@@ -1016,9 +1016,16 @@ typedef struct _THREAD_UMS_INFORMATION
THREAD_UMS_INFORMATION_COMMAND Command;
PRTL_UMS_COMPLETION_LIST CompletionList;
PRTL_UMS_CONTEXT UmsContext;
+ union
+ {
ULONG Flags;
- ULONG IsUmsSchedulerThread;
- ULONG IsUmsWorkerThread;
+ struct
+ {
+ ULONG IsUmsSchedulerThread : 1;
+ ULONG IsUmsWorkerThread : 1;
+ ULONG SpareBits : 30;
+ };
+ };
} THREAD_UMS_INFORMATION, *PTHREAD_UMS_INFORMATION;
// private
|
additional ranking logic
|
@@ -569,7 +569,10 @@ bool GetFortunastakeRanks(CBlockIndex* pindex)
BOOST_FOREACH(CFortunaStake& mn, vecFortunastakeScoresList)
{
i++;
- if (mn.nTimeRegistered > pindex->GetBlockTime() || mn.lastDseep > 0) {
+ if (mn.nTimeRegistered > pindex->GetBlockTime() // mn's broadcast is newer than our current block
+ || mn.lastDseep == 0 // mn has not sent a dseep yet, the node needs to be active to qualify
+ || mn.lastDseep < pindex->GetBlockTime() - 600) // mn last dseep was 600 seconds ago, they probably aren't active anymore so let's not rank them
+ {
vecFortunastakeScores.push_back(vecFortunastakeScores[i]);
vecFortunastakeScores.erase(vecFortunastakeScores.begin() + i);
}
|
Fix run-binary-debug verbosity
|
@@ -96,7 +96,7 @@ run-binary-fast: $(sim)
# helper rules to run simulator with as much debug info as possible
#########################################################################################
run-binary-debug: $(sim_debug)
- (set -o pipefail && $(sim_debug) $(PERMISSIVE_ON) +max-cycles=$(timeout_cycles) $(SIM_FLAGS) $(VERBOSE_FLAG) $(WAVEFORM_FLAG) $(PERMISSIVE_OFF) $(BINARY) 3>&1 1>&2 2>&3 | spike-dasm > $(sim_out_name).out)
+ (set -o pipefail && $(sim_debug) $(PERMISSIVE_ON) +max-cycles=$(timeout_cycles) $(SIM_FLAGS) $(VERBOSE_FLAGS) $(WAVEFORM_FLAG) $(PERMISSIVE_OFF) $(BINARY) 3>&1 1>&2 2>&3 | spike-dasm > $(sim_out_name).out)
run-fast: run-asm-tests-fast run-bmark-tests-fast
|
in_forward: switched FLB_INPUT_NET with FLB_INPUT_NET_SERVER and added
the FLB_IO_OPT_TLS flag.
|
@@ -319,5 +319,5 @@ struct flb_input_plugin in_forward_plugin = {
.cb_pause = in_fw_pause,
.cb_exit = in_fw_exit,
.config_map = config_map,
- .flags = FLB_INPUT_NET
+ .flags = FLB_INPUT_NET_SERVER | FLB_IO_OPT_TLS
};
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.