This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* calibration table generated 2022-03-21T15:12:26.123655 | |
| table represented within tolerance 0.1% by 46 points | |
| capacity: 12.57 Ah | |
| 138.89 Wh | |
| 100% | ~~~~~ | |
| | ~~ | |
| | ~ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // find the segmented address of STAGE3_ENTRY | |
| // be careful: rust *really* wants to optimize STAGE3_ENTRY into a u16 | |
| // in the resulting binary | |
| let mut buf_address: u32; | |
| unsafe { | |
| core::arch::asm!( | |
| "mov {1}, {0}", | |
| in(reg) STAGE3_ENTRY, | |
| out(reg) buf_address, | |
| ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #![no_std] | |
| #![no_main] | |
| #![feature(asm_sym)] | |
| #![feature(naked_functions)] | |
| use blue_loader_stage3::{realmode, realmode_asm}; | |
| extern "sysv64" { | |
| static REALMODE_IMAGE: &'static [u8]; | |
| static mut REALMODE: &'static mut [u8]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use angle::Rad; | |
| use wasm_bindgen::prelude::*; | |
| use wasm_bindgen::JsCast; | |
| macro_rules! log { | |
| ( $( $t:tt )* ) => { | |
| web_sys::console::log_1(&format!( $( $t )* ).into()); | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| import argparse | |
| import io | |
| import os.path | |
| import shutil | |
| import zipfile | |
| from PIL import Image |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import carbide | |
| import numpy as np | |
| s = carbide.scene.Scene() | |
| s.camera.resolution.modify(1920, 1080) | |
| s.renderer.spp = 64 | |
| s.renderer.spp_step = 4 | |
| for _ in range(100): | |
| c = carbide.scene.Cube() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import carbide | |
| import numpy as np | |
| s = carbide.scene.Scene() | |
| s.camera.resolution.modify(1920, 1080) | |
| s.renderer.spp = 64 | |
| a = carbide.scene.Sphere() | |
| a.translate(-2, 0, 5) | |
| a.emission = carbide.scene.ConstantTexture.grey(2.0) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| connected. | |
| >>> GetProperties { | |
| version: Version( | |
| "1.7", | |
| ), | |
| device: None, | |
| name: None, | |
| } | |
| <<< DefSwitchVector { | |
| device: "Telescope Simulator", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/bootloaders/caterina/Caterina.h b/bootloaders/caterina/Caterina.h | |
| index 5ce80fa..c273d50 100644 | |
| --- a/bootloaders/caterina/Caterina.h | |
| +++ b/bootloaders/caterina/Caterina.h | |
| @@ -65,10 +65,10 @@ | |
| #define SOFTWARE_IDENTIFIER "CATERINA" | |
| #define CPU_PRESCALE(n) (CLKPR = 0x80, CLKPR = (n)) | |
| - #define LED_SETUP() DDRC |= (1<<7); DDRB |= (1<<0); DDRD |= (1<<5); | |
| - #define L_LED_OFF() PORTC &= ~(1<<7) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| void display_num(DisplayType type, uint16_t v) { | |
| uint8_t out[DISPLAY_DIGITS]; | |
| unsigned int i; | |
| for (i = 0; i < DISPLAY_DIGITS; i++) { | |
| out[i] = v % 10; | |
| v /= 10; | |
| if (!v) { | |
| break; | |
| } | |
| } |