Merge remote-tracking branch 'origin/main' into main
This commit is contained in:
@@ -4,35 +4,62 @@ import time
|
|||||||
import PyLidar3
|
import PyLidar3
|
||||||
import asyncio
|
import asyncio
|
||||||
import websockets
|
import websockets
|
||||||
|
from concurrent.futures import ThreadPoolExecutor
|
||||||
#arduino = serial.Serial(port='COM5', baudrate=9600)
|
|
||||||
#lidar = PyLidar3.YdLidarX4(port='COM6',chunk_size=20000) #PyLidar3.your_version_of_lidar(port,chunk_size)
|
|
||||||
|
|
||||||
f = open("PointCloudWeb.Scanner\datafile.txt","wt")
|
f = open("PointCloudWeb.Scanner\datafile.txt","wt")
|
||||||
f.write("y, x, z\n")
|
f.write("y, x, z\n")
|
||||||
|
|
||||||
progress = 0
|
arduino_status = False
|
||||||
|
arduino_port = "COM9"
|
||||||
|
arduino_baud = 9600
|
||||||
|
arduino = None
|
||||||
|
lidar_status = False
|
||||||
|
lidar_port = "COM6"
|
||||||
|
lidar_chunk_size = 20000
|
||||||
|
lidar = None
|
||||||
|
scan_progress = 0
|
||||||
|
_executor = ThreadPoolExecutor(1)
|
||||||
|
newMessage = ""
|
||||||
|
lastMessage = ""
|
||||||
|
|
||||||
print("Start ...")
|
async def init(websocket):
|
||||||
time.sleep(2)
|
global arduino
|
||||||
print("Ready:")
|
arduino = serial.Serial(port=arduino_port, baudrate=arduino_baud)
|
||||||
|
try:
|
||||||
|
await websocket.send("arduino connected " + arduino_port)
|
||||||
|
global arduino_status
|
||||||
|
arduino_status = True
|
||||||
|
except:
|
||||||
|
await websocket.send("can not connect to arduino! " + arduino_port)
|
||||||
|
try:
|
||||||
|
global lidar
|
||||||
|
lidar = PyLidar3.YdLidarX4(port=lidar_port,chunk_size=lidar_chunk_size) #PyLidar3.your_version_of_lidar(port,chunk_size)
|
||||||
|
if(lidar.Connect()):
|
||||||
|
global lidar_status
|
||||||
|
lidar_status = True
|
||||||
|
await websocket.send("lidar connected " + lidar_port)
|
||||||
|
else:
|
||||||
|
raise ValueError
|
||||||
|
except:
|
||||||
|
await websocket.send("can not connect to lidar! " + lidar_port)
|
||||||
|
|
||||||
def arduino_write_read(x):
|
def arduino_write_read(x):
|
||||||
arduino.write(bytes(x, 'utf-8'))
|
arduino.write(bytes(x, 'utf-8'))
|
||||||
data = arduino.readline()
|
data1 = arduino.readline()
|
||||||
return filterY(str(data))
|
return filterY(str(data1))
|
||||||
|
|
||||||
def setY(y):
|
def setY(y):
|
||||||
print(arduino_write_read("<set><"+str(y)+">"))
|
tmp = arduino_write_read("<set><"+str(y)+">")
|
||||||
|
print(tmp)
|
||||||
|
|
||||||
def getY():
|
# def getY():
|
||||||
print(arduino_write_read("<get>"))
|
# print(arduino_write_read("<get>"))
|
||||||
|
|
||||||
def resetY():
|
# def resetY():
|
||||||
print(arduino_write_read("<reset>"))
|
# print(arduino_write_read("<reset>"))
|
||||||
|
|
||||||
def zerotY():
|
# def zerotY():
|
||||||
print(arduino_write_read("<zero>"))
|
# print(arduino_write_read("<zero>"))
|
||||||
|
|
||||||
def filterY(data):
|
def filterY(data):
|
||||||
temp = data[data.find("<"):data.find(">")]
|
temp = data[data.find("<"):data.find(">")]
|
||||||
@@ -42,42 +69,56 @@ def senddata(data,posy):
|
|||||||
for x,y in data.items():
|
for x,y in data.items():
|
||||||
f.write(str(posy) + ", " + str(x) + ", " + str(y) + "\n")
|
f.write(str(posy) + ", " + str(x) + ", " + str(y) + "\n")
|
||||||
|
|
||||||
def startScaner(mode):
|
def startScaner(websocket, mode):
|
||||||
if(lidar.Connect()):
|
global scan_progress
|
||||||
|
global lidar
|
||||||
|
if lidar_status == True:
|
||||||
print(lidar.GetDeviceInfo())
|
print(lidar.GetDeviceInfo())
|
||||||
gen = lidar.StartScanning()
|
gen = lidar.StartScanning()
|
||||||
t = time.time() # start time
|
if mode == "0":
|
||||||
if(mode == "0"):
|
|
||||||
print("Mode 0")
|
print("Mode 0")
|
||||||
for y in range(18):
|
for y in range(18):
|
||||||
senddata(next(gen),y*10)
|
senddata(next(gen),y*10)
|
||||||
time.sleep(2)
|
time.sleep(2)
|
||||||
setY( y*10)
|
setY( y*10)
|
||||||
time.sleep(2)
|
time.sleep(2)
|
||||||
|
scan_progress = y/18*100
|
||||||
|
print(str(scan_progress) + " %")
|
||||||
setY(0)
|
setY(0)
|
||||||
elif(mode == "1"):
|
lidar.StopScanning()
|
||||||
|
lidar.Disconnect()
|
||||||
|
elif mode == "1":
|
||||||
print("Mode 1")
|
print("Mode 1")
|
||||||
for y in range(90):
|
for y in range(90):
|
||||||
senddata(next(gen),y*2)
|
senddata(next(gen),y*2)
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
setY(y*2)
|
setY(y*2)
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
|
scan_progress = y/90*100
|
||||||
|
print(str(scan_progress) + " %")
|
||||||
setY(0)
|
setY(0)
|
||||||
elif(mode == "2"):
|
lidar.StopScanning()
|
||||||
|
lidar.Disconnect()
|
||||||
|
elif mode == "2":
|
||||||
print("Mode 2")
|
print("Mode 2")
|
||||||
for y in range(360):
|
for y in range(360):
|
||||||
senddata(next(gen),y*0.5)
|
senddata(next(gen),y*0.5)
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
setY(y*0.5)
|
setY(y*0.5)
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
|
scan_progress = y/360*100
|
||||||
|
print(str(scan_progress) + " %")
|
||||||
setY(0)
|
setY(0)
|
||||||
|
lidar.StopScanning()
|
||||||
|
lidar.Disconnect()
|
||||||
|
elif mode == "3":
|
||||||
|
print(scan_progress)
|
||||||
|
scan_progress += 1
|
||||||
|
print(scan_progress)
|
||||||
else:
|
else:
|
||||||
print("mode error")
|
print("mode error")
|
||||||
|
|
||||||
f.close()
|
f.close()
|
||||||
lidar.StopScanning()
|
|
||||||
lidar.Disconnect()
|
|
||||||
print("scan stoped")
|
print("scan stoped")
|
||||||
else:
|
else:
|
||||||
print("Error connecting to device")
|
print("Error connecting to device")
|
||||||
@@ -85,37 +126,50 @@ def startScaner(mode):
|
|||||||
async def wsfilter(websocket, message):
|
async def wsfilter(websocket, message):
|
||||||
command = message[message.find("<")+1:message.find(">")]
|
command = message[message.find("<")+1:message.find(">")]
|
||||||
value = message[message.find("><")+2:message.find(">", message.find("><")+2)]
|
value = message[message.find("><")+2:message.find(">", message.find("><")+2)]
|
||||||
#print(command + " / " + value)
|
|
||||||
await wsaction(websocket, command,value)
|
await wsaction(websocket, command,value)
|
||||||
|
|
||||||
async def wsaction(websocket, command, value):
|
async def wsaction(websocket, command, value):
|
||||||
if(command == "start"):
|
if command == "start":
|
||||||
if(value == "0"):
|
if value == "0":
|
||||||
await websocket.send("start scan resolution 0")
|
await websocket.send("start scan resolution 0")
|
||||||
elif(value =="1"):
|
await loop.run_in_executor(_executor, startScaner(websocket, value))
|
||||||
|
elif value =="1":
|
||||||
await websocket.send("start scan resolution 1")
|
await websocket.send("start scan resolution 1")
|
||||||
elif(value =="2"):
|
await loop.run_in_executor(_executor, startScaner(websocket, value))
|
||||||
|
elif value =="2":
|
||||||
await websocket.send("start scan resolution 2")
|
await websocket.send("start scan resolution 2")
|
||||||
|
await loop.run_in_executor(_executor, startScaner(websocket, value))
|
||||||
|
elif value =="3":
|
||||||
|
await websocket.send("start scan test")
|
||||||
|
await loop.run_in_executor(_executor, startScaner(websocket, value))
|
||||||
else:
|
else:
|
||||||
await websocket.send("mode error")
|
await websocket.send("mode error")
|
||||||
elif(command == "status"):
|
elif command == "connect" and arduino and lidar != None:
|
||||||
await websocket.send("Status ...")
|
await websocket.send("try to connect to Adruino and LIDAR")
|
||||||
|
await init(websocket)
|
||||||
|
elif command == "status":
|
||||||
|
await websocket.send("progress: " + scan_progress)
|
||||||
else:
|
else:
|
||||||
await websocket.send("command error")
|
await websocket.send("command error")
|
||||||
#muss noch was passieren
|
|
||||||
|
|
||||||
async def wscom(websocket, path):
|
async def wscom(websocket, path):
|
||||||
print("connected")
|
await websocket.send("Websocket connected")
|
||||||
|
await init(websocket)
|
||||||
while True:
|
while True:
|
||||||
data = await websocket.recv()
|
data2 = await websocket.recv()
|
||||||
await wsfilter(websocket, data)
|
await wsfilter(websocket, data2)
|
||||||
print({data})
|
print({data2})
|
||||||
#await websocket.send(data)
|
if scan_progress != lastMessage:
|
||||||
|
await websocket.send(scan_progress)
|
||||||
|
lastMessage = scan_progress
|
||||||
|
|
||||||
async def main():
|
async def main():
|
||||||
server = await websockets.serve(wscom, 'localhost', 6789)
|
server = await websockets.serve(wscom, 'localhost', 6789)
|
||||||
await server.wait_closed()
|
await server.wait_closed()
|
||||||
asyncio.run(main())
|
|
||||||
|
loop = asyncio.get_event_loop()
|
||||||
|
loop.run_until_complete(main())
|
||||||
|
#asyncio.run(main())
|
||||||
|
|
||||||
#while True:
|
#while True:
|
||||||
# startScaner(input("Scan Modus(0,1,2):"))
|
# startScaner(input("Scan Modus(0,1,2):"))
|
||||||
|
|||||||
151
PointCloudWeb.Scanner/test/serverWSonly.py
Normal file
151
PointCloudWeb.Scanner/test/serverWSonly.py
Normal file
@@ -0,0 +1,151 @@
|
|||||||
|
# Importing Libraries
|
||||||
|
import serial
|
||||||
|
import time
|
||||||
|
import PyLidar3
|
||||||
|
import asyncio
|
||||||
|
import websockets
|
||||||
|
from concurrent.futures import ThreadPoolExecutor
|
||||||
|
import threading
|
||||||
|
import collections
|
||||||
|
|
||||||
|
f = open("PointCloudWeb.Scanner\datafile.txt","wt")
|
||||||
|
f.write("y, x, z\n")
|
||||||
|
|
||||||
|
arduino_status = False
|
||||||
|
arduino_port = "COM9"
|
||||||
|
arduino_baud = 9600
|
||||||
|
arduino = None
|
||||||
|
lidar_status = False
|
||||||
|
lidar_port = "COM6"
|
||||||
|
lidar_chunk_size = 20000
|
||||||
|
lidar = None
|
||||||
|
scan_progress = 0
|
||||||
|
messageQeue = ['test', 'test1', 'abc']
|
||||||
|
ws_message_queue = collections.deque(maxlen=100)
|
||||||
|
|
||||||
|
async def init():
|
||||||
|
global arduino, ws_message_queue
|
||||||
|
arduino = "Arduino"
|
||||||
|
try:
|
||||||
|
ws_message_queue.appendleft("arduino connected " + arduino_port)
|
||||||
|
global arduino_status
|
||||||
|
arduino_status = True
|
||||||
|
except:
|
||||||
|
ws_message_queue.appendleft("can not connect to arduino! " + arduino_port)
|
||||||
|
try:
|
||||||
|
global lidar
|
||||||
|
lidar = "lidar 1"
|
||||||
|
global lidar_status
|
||||||
|
lidar_status = True
|
||||||
|
ws_message_queue.appendleft("lidar connected " + lidar_port)
|
||||||
|
except:
|
||||||
|
ws_message_queue.appendleft("can not connect to lidar! " + lidar_port)
|
||||||
|
|
||||||
|
def arduino_write_read(x):
|
||||||
|
data1 = x
|
||||||
|
return filterY(str(data1))
|
||||||
|
|
||||||
|
def setY(y):
|
||||||
|
tmp = arduino_write_read("<set><"+str(y)+">")
|
||||||
|
print(tmp)
|
||||||
|
|
||||||
|
def filterY(data):
|
||||||
|
temp = data[data.find("<"):data.find(">")]
|
||||||
|
return temp + data[data.find("><"):data.find(">", data.find("><")+2)+1]
|
||||||
|
|
||||||
|
def senddata(data,posy):
|
||||||
|
for x,y in data.items():
|
||||||
|
f.write(str(posy) + ", " + str(x) + ", " + str(y) + "\n")
|
||||||
|
|
||||||
|
def startScaner(mode):
|
||||||
|
global scan_progress, lidar, messageQeue
|
||||||
|
if lidar_status == True:
|
||||||
|
ws_message_queue.appendleft("start scan mode: " + mode)
|
||||||
|
if mode == "0":
|
||||||
|
ws_message_queue.appendleft("<scan>running")
|
||||||
|
for y in range(19):
|
||||||
|
time.sleep(0.2)
|
||||||
|
setY( y*10)
|
||||||
|
scan_progress = round(y/18*100)
|
||||||
|
ws_message_queue.appendleft("<progress>" + str(scan_progress))
|
||||||
|
setY(0)
|
||||||
|
elif mode == "1":
|
||||||
|
ws_message_queue.appendleft("<scan>running")
|
||||||
|
for y in range(91):
|
||||||
|
time.sleep(0.2)
|
||||||
|
setY(y*2)
|
||||||
|
scan_progress = round(y/90*100)
|
||||||
|
ws_message_queue.appendleft("<progress>" + str(scan_progress))
|
||||||
|
setY(0)
|
||||||
|
elif mode == "2":
|
||||||
|
ws_message_queue.appendleft("<scan>running")
|
||||||
|
for y in range(361):
|
||||||
|
time.sleep(0.1)
|
||||||
|
setY(y*0.5)
|
||||||
|
scan_progress = round(y/360*100)
|
||||||
|
ws_message_queue.appendleft("<progress>" + str(scan_progress))
|
||||||
|
setY(0)
|
||||||
|
else:
|
||||||
|
ws_message_queue.appendleft("mode error")
|
||||||
|
|
||||||
|
f.close()
|
||||||
|
ws_message_queue.appendleft("<scan>finished")
|
||||||
|
ws_message_queue.appendleft("scan finished")
|
||||||
|
else:
|
||||||
|
ws_message_queue.appendleft("Error connecting to device")
|
||||||
|
|
||||||
|
async def wsfilter(message):
|
||||||
|
command = message[message.find("<")+1:message.find(">")]
|
||||||
|
value = message[message.find("><")+2:message.find(">", message.find("><")+2)]
|
||||||
|
await wsaction(command,value)
|
||||||
|
|
||||||
|
async def wsaction(command, value):
|
||||||
|
global ws_message_queue
|
||||||
|
if command == "start":
|
||||||
|
if value == "0":
|
||||||
|
ws_message_queue.appendleft("start scan on low resolution")
|
||||||
|
x = threading.Thread(target=startScaner, args=(value))
|
||||||
|
x.start()
|
||||||
|
elif value =="1":
|
||||||
|
ws_message_queue.appendleft("start scan on medium resolution")
|
||||||
|
x = threading.Thread(target=startScaner, args=(value))
|
||||||
|
x.start()
|
||||||
|
elif value =="2":
|
||||||
|
ws_message_queue.appendleft("start scan on high resolution")
|
||||||
|
x = threading.Thread(target=startScaner, args=(value))
|
||||||
|
x.start()
|
||||||
|
else:
|
||||||
|
ws_message_queue.appendleft("mode error")
|
||||||
|
elif command == "connect" and arduino and lidar != None:
|
||||||
|
ws_message_queue.appendleft("try to connect to Adruino and LIDAR")
|
||||||
|
await init()
|
||||||
|
elif command == "status":
|
||||||
|
ws_message_queue.appendleft("progress: " + scan_progress)
|
||||||
|
else:
|
||||||
|
ws_message_queue.appendleft("command error")
|
||||||
|
|
||||||
|
async def producer_handler(websocket, path):
|
||||||
|
while True:
|
||||||
|
global ws_message_queue
|
||||||
|
if len(ws_message_queue) > 0:
|
||||||
|
message = ws_message_queue.pop()
|
||||||
|
await websocket.send(message)
|
||||||
|
await asyncio.sleep(0.01)
|
||||||
|
|
||||||
|
async def consumer_handler(websocket, path):
|
||||||
|
async for message in websocket:
|
||||||
|
await wsfilter(message)
|
||||||
|
|
||||||
|
async def handler(websocket, path):
|
||||||
|
print("Start Websocket Connection")
|
||||||
|
await init()
|
||||||
|
consumer_task = asyncio.ensure_future(consumer_handler(websocket, path))
|
||||||
|
producer_task = asyncio.ensure_future(producer_handler(websocket, path))
|
||||||
|
done, pending = await asyncio.wait([consumer_task, producer_task], return_when=asyncio.FIRST_COMPLETED)
|
||||||
|
for task in pending:
|
||||||
|
task.cancel()
|
||||||
|
|
||||||
|
ws_server = websockets.serve(handler, 'localhost', 6789)
|
||||||
|
loop = asyncio.get_event_loop()
|
||||||
|
loop.run_until_complete(ws_server)
|
||||||
|
loop.run_forever()
|
||||||
@@ -1,18 +1,27 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div class="ui">
|
||||||
<h1>Welcome to PointCloudWeb</h1>
|
<h1>Welcome to PointCloudWeb</h1>
|
||||||
<div class="scanresolution">
|
<div v-if="connection_status && !scan_status">
|
||||||
<button v-on:click="sendMessage('<start><0>')" >Start Scan: low</button>
|
<button class="button" v-on:click="sendMessage('<start><0>')" >Start Scan: low</button>
|
||||||
<button v-on:click="sendMessage('<start><1>')" >Start Scan: medium</button>
|
<button class="button button2" v-on:click="sendMessage('<start><1>')" >Start Scan: medium</button>
|
||||||
<button v-on:click="sendMessage('<start><2>')" >Start Scan: high</button>
|
<button class="button button3" v-on:click="sendMessage('<start><2>')" >Start Scan: high</button>
|
||||||
<button v-on:click="sendMessage('Connect')" >Connect</button>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="scanresolution">
|
<div class="progressbar" v-if="connection_status">
|
||||||
<h1>status: {{status}}</h1>
|
<div :style="{width: progress + '%'}"></div>
|
||||||
|
</div>
|
||||||
|
<p v-if="connection_status">{{progress}} %</p>
|
||||||
|
<div>
|
||||||
|
<h1 v-if="!connection_status">status: disconnected</h1>
|
||||||
|
<h1 v-if="connection_status">status: connected</h1>
|
||||||
|
<button v-if="!connection_status" v-on:click="connectWS" >Connect</button>
|
||||||
|
<ul>
|
||||||
<div class="value" v-for="(item, index) in logs" :key="item.id">
|
<div class="value" v-for="(item, index) in logs" :key="item.id">
|
||||||
{{logs[index]}}
|
<li>{{logs[index]}}</li>
|
||||||
</div>
|
</div>
|
||||||
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
<!--<button v-on:click="connection_status = !connection_status" >test</button>-->
|
||||||
|
<button v-on:click="logs = []" >clear logs</button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -20,34 +29,119 @@
|
|||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
wsConnection: null,
|
||||||
logs: [],
|
logs: [],
|
||||||
status: "disconnected"
|
connection_status: false,
|
||||||
|
scan_status: false,
|
||||||
|
progress: 0,
|
||||||
|
command: "",
|
||||||
|
value: ""
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
sendMessage: function(message) {
|
sendMessage(message) {
|
||||||
|
this.wsConnection.send(message);
|
||||||
this.connection.send(message);
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
created: function() {
|
connectWS(){
|
||||||
this.connection = new WebSocket("ws://127.0.0.1:6789/")
|
this.wsConnection = new WebSocket("ws://127.0.0.1:6789/")
|
||||||
let that = this
|
let that = this
|
||||||
|
|
||||||
this.connection.onopen = function(){
|
this.wsConnection.onopen = function(){
|
||||||
that.status = "connected"
|
that.connection_status = true
|
||||||
that.logs.push("successfully connected to scanserver")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.connection.onmessage = function(event){
|
this.wsConnection.onmessage = function(event){
|
||||||
console.log(event)
|
if(event.data)
|
||||||
that.logs.push(event.data);
|
that.msgFilter(event.data)
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
msgFilter(message){
|
||||||
|
let that = this
|
||||||
|
if(message.search("<") != -1){
|
||||||
|
that.command = message.substr(message.search("<")+1, message.search(">")-1)
|
||||||
|
that.value = message.substr(message.search(">")+1)
|
||||||
|
console.log("command: " + that.command + " / value: " + that.value)
|
||||||
|
this.action(that.command, that.value)
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
that.command = "log"
|
||||||
|
that.value = message
|
||||||
|
this.action(that.command, that.value)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
action(command, value){
|
||||||
|
let that = this
|
||||||
|
if(command == "progress"){
|
||||||
|
that.progress = parseInt(value, 10)
|
||||||
|
}
|
||||||
|
else if(command == "log"){
|
||||||
|
that.logs.push(value);
|
||||||
|
}
|
||||||
|
else if(command == "scan"){
|
||||||
|
if(value == "running")
|
||||||
|
that.scan_status = true
|
||||||
|
else
|
||||||
|
that.scan_status = false
|
||||||
|
}
|
||||||
|
else
|
||||||
|
that.logs.push("Unknow command: " + value);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.connectWS();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|
||||||
|
.ui {
|
||||||
|
width: 600px;
|
||||||
|
margin: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
ul {
|
||||||
|
overflow: scroll;
|
||||||
|
background: lightgray;
|
||||||
|
height: 200px;
|
||||||
|
}
|
||||||
|
|
||||||
|
li {
|
||||||
|
list-style-type: none;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.progressbar {
|
||||||
|
background-color: grey;
|
||||||
|
border-radius: 7px;
|
||||||
|
/* (height of inner div) / 2 + padding */
|
||||||
|
padding: 3px;
|
||||||
|
margin: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.progressbar>div {
|
||||||
|
background-color: greenyellow;
|
||||||
|
/* Adjust with JavaScript */
|
||||||
|
height: 20px;
|
||||||
|
border-radius: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button {
|
||||||
|
background-color: #4CAF50; /* Green */
|
||||||
|
border: none;
|
||||||
|
color: white;
|
||||||
|
padding: 15px 32px;
|
||||||
|
text-align: center;
|
||||||
|
text-decoration: none;
|
||||||
|
display: inline-block;
|
||||||
|
font-size: 16px;
|
||||||
|
margin: 4px 2px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button2 {background-color: #008CBA;} /* Blue */
|
||||||
|
.button3 {background-color: #f44336;} /* Red */
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
Reference in New Issue
Block a user