Easy-to-manage touch screens
Free, open-source touch screens. Guided USB setup, a drag-and-drop editor and local control. Made for Home Assistant.
บันทึกการขับรถไฟฟ้าและรถน้ำมัน พร้อมคำนวณแบตเตอรี่ ค่าไฟ และอัตราสิ้นเปลืองเชื้อเพลิง
Translation pending
AI summary · revised during review
LifestyleHTML · JavaScriptGitHub @warodom1142OnlineOwner unconfirmed
Have you tried it? One tap is enough. No sign-in needed.
No updates detected yet. GitHub releases will appear here.
Owners of public repositories under a personal GitHub account can sign in to verify ownership and manage the introduction themselves. No administrator approval is needed.
Sign in, generate a verification file, and commit it to this repository’s default branch within 30 minutes. Files on other branches or forks do not count. Then check the file below to manage the project without administrator approval. Keep the file to retain your access.
If needed, you will go to sign-in. After signing in, return here and press your chosen verification button again.
Run /nomorevibe verify in your project folder to verify ownership and manage the introduction yourself.
Verify in one minuteAsk about other verification options
The maker's introduction consists of the line above. Read the repository README for more details. Repository README ↗
Loading the full README.
Read the full README ↗บันทึกไมล์ แบต% และโหมดขับของรถไฟฟ้า เพื่อคำนวณอัตราการใช้ไฟ ระยะทาง และค่าใช้จ่ายชาร์จ DC
web/ หน้าเว็บ (index.html ไฟล์เดียว) ฝังบน Vercel
apps-script/ Code.gs เป็น API เชื่อมกับ Google Sheet (ฐานข้อมูล)
local/ เวอร์ชันเก่า เก็บข้อมูลใน localStorage ของเบราว์เซอร์
tests/ unit test ของตรรกะคำนวณเวอร์ชัน local
apps-script/Code.gs ลงในไฟล์ Code.gs/execแก้โค้ดแล้วต้อง Deploy ใหม่ที่ Manage deployments → Edit → New version (ลิงก์เดิมยังใช้ได้)
ใครมีลิงก์ Apps Script ก็เรียก API ได้ ใช้เฉพาะคนที่ไว้ใจ
/exec ในตัวแปร API_URL ใน web/index.htmlweb แล้ว Deploy (Framework: Other)| ค่า | สูตร |
|---|---|
| ระยะช่วงนี้ | ไมล์ปัจจุบัน − ไมล์บันทึกก่อนหน้า |
| kWh ที่ใช้ | (แบต% ก่อน − แบต% ปัจจุบัน) ÷ 100 × ความจุแบต |
| kWh/100 km | kWh ที่ใช้ ÷ ระยะ × 100 |
| ระยะเต็มแบตตามจอ | ระยะบนจอ ÷ แบต% × 100 (ณ จุดเริ่มช่วง) |
| ระยะเต็มแบตจริง | ระยะช่วงนี้ ÷ แบต% ที่ลด × 100 |
| kWh ที่ชาร์จ | ค่าที่กรอก หรือ (แบต% หลัง − ก่อน) ÷ 100 × ความจุ |
| ค่าชาร์จ | ค่าที่กรอก หรือ kWh × ราคาชาร์จ DC |
| ค่าใช้จ่ายจริงต่อ km | ค่าชาร์จรวม ÷ ระยะรวม |
| ค่าไฟโดยประมาณต่อ km | (kWh/100 km ÷ 100) × ราคาเฉลี่ยต่อ kWh |
| ประสิทธิภาพการชาร์จ | พลังงานที่แบตได้รับ ÷ kWh ที่ตู้แจ้ง (เฉพาะที่กรอกเอง) |
ข้อจำกัด: อัตราการใช้ไฟคิดจาก แบต% ซึ่งละเอียดแค่ 1% ระยะสั้นๆ จึงคลาดเคลื่อนได้ ควรบันทึกเป็นช่วงที่ยาวพอ
npm test