Example #1
0
// Public methods
void GlobalPlanner::send_next_step(){
	get_map_data();
	populate_all_nodes();
	get_destination();
	get_current_location();
	calculate_path();
	find_next_step();
}
Example #2
0
void LocalPlanner::move_to_point(){
	get_current_location();
	get_destination();
	calculate_new_heading();
	if (check_heading_difference() == 0)
		resolve_heading();
	else
		resolve_distance();
}
Example #3
0
void pal_nvm_multi_read32(uint8_t var_id, uint32_t **value)
{
    uint32_t addr;

    if (get_current_location(var_id, &addr) == false)
    {
        // No empty area could be found; use the last entry of the last page
        addr = NVM_MULTI_WRITE_START + ((var_id + 1) * NVM_MULTI_WRITE_NUM_PG_PER_VAR * SPM_PAGESIZE) - sizeof(uint32_t);
    }

    var_addr[var_id] = addr;

    // Read 32 bit value
    uint8_t *ptr;
    ptr = (uint8_t *)value;
    for (uint8_t i = 0; i < sizeof(uint32_t); i++)
    {
        *ptr = PGM_READ_BYTE_FAR(addr);
        ptr++;
        addr++;
    }
}
Example #4
0
extern "C" char* webview_current_location() {
	return get_current_location();
}